Azure / azure-functions-core-tools

Command line tools for Azure Functions
MIT License
1.32k stars 433 forks source link

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

Open codebrane opened 1 year ago

codebrane commented 1 year ago

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.

raelorne commented 9 months ago

I have this issue in v4.0.5455.