microsoft / vscode-azurefunctions

Azure Functions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions
MIT License
290 stars 131 forks source link

During Create Function when using C#, "HTTP Trigger" does not exist, only the trigger option from OpenAPI #4079

Open RJWerning opened 3 months ago

RJWerning commented 3 months ago

I'm new to creating Azure functions, so bear with me here. I'm doing some learning to wrap my head around an upcoming project and am trying to create some C# Azure functions in a test environment.

I'm trying to create a C# function using HTTP Trigger, but afaik we won't need to bother with the OpenAPI spec as it looks like just some internal functions for specific purposes. When I try to create using VS Code (v1.78.2) and Azure Functions extension (released 4/4/24), there is no option for just an "HTTP Trigger", only the one for "HTTP Trigger .. from OpenAPI ..". Was this intentionally removed or is there an issue?

I am able to create an "HTTP Trigger" from CLI without an issue.

func new --name HttpTrigger1 --template "HTTP trigger"

I tried clearing the cache as outline in #2588. I have tried using multiple runtimes - .NET 6, 7, and 8.0 Isolated LTS, as well as .NET Framework.

Any help would be appreciated. Thanks, Rich

RJWerning commented 3 months ago

Believe I resolved the issue, it was defaulting to use "Verified" templates, by changing this to "Core" the HTTP Function now appears. Could this cause me any issues?

nturinski commented 3 months ago

Thanks for filing this!

That's odd; I believe that we should have added the new HTTP Trigger to the verified list... There was a change to the id for C# triggers.

I'll look into why it's not showing up as "Verified" but your workaround of changing the filter to "Core" shouldn't cause any issues.