Azure / Azure/azure-functions-core-tools

func new --template does not work as the names do not match the templates to use

Open
#3,440 3 comments 1 reaction 1 assignee Claimed by @soninaren View on GitHub
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
4d 20h
Merged PRs (30d)
14

Description

using azure core tools on mac:

```
func version
4.0.5274

```
list the templates available:

`func templates list`

```
C# Templates:
...
Azure Service Bus Queue trigger

```
try and create the template:

`func new --template "Azure Service Bus Queue trigger" --name MyQueueTrigger`

and it fails:

```
Creating dotnet function...
Unknown template 'AzureServiceBusQueuetrigger' (Parameter 'templateName')

```

try it another way:

`func new`

```
Select a number for template:
...
6. ServiceBusQueueTrigger
...

```
and it works:

`The function "MyQueueTrigger" was created successfully from the "ServiceBusQueueTrigger" template.`

try it using the actual template as provided by the second method:

`func new --template "ServiceBusQueueTrigger" --name MyQueueTrigger2`

and it works:

`The function "MyQueueTrigger2" was created successfully from the "ServiceBusQueueTrigger" template.`

So the list of templates shows names but not templates and cannot be used to create functions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.