azure-functions-core-tools
azure-functions-core-tools copied to clipboard
Auto generated launch tasks not working with generated isolated solution
Version
Running version 4.0.5907 of Azure Core Tools
Description
Following the guide in the learn article here will result in a project/solution that can't be started with what you get. As the commands generated in the tasks file doesn't specify which project or solution it should run. Running the same thing, but choosing to use the option which doesn't have isolated in the name, will result in a solution that works. But I assume that is the in-process version, which will stop getting support in the future.
I solved it by adding the argument "Projectname.csproj", as the 2nd argument for each task in tasks.json. But it feels like maybe this should be there by default, or is something wonky on my side with how it doesn't work out of the box?
Steps to reproduce
I followed the guide as-is provided in the Microsoft Learn Article that i posted in the description.
- open command palette
- choose azure functions: create new project and then follow below.
| Prompt | Selection |
|---|---|
| Select a language for your function project | Choose C#. |
| Select a .NET runtime | Choose .NET 8.0 Isolated (LTS). |
| Select a template for your project's first function | Choose HTTP trigger.1 |
| Provide a function name | Type HttpExample. |
| Provide a namespace | Type My.Functions. |
| Authorization level | Choose Anonymous, which enables anyone to call your function endpoint. For more information, see Authorization level. |
| Select how you would like to open your project | Select Open in current window. |
And then just hit F5 to run it.
Can you try the reproduction steps from scratch, but remove the .sln file.
Actually, deleting the solution file isn't the answer because when you re-open the project, VS Code adds it back in "Projectname.generated.sln" and it breaks again.
The only current solution is to add the csproj into the build and clean tasks in the tasks.json as stated above
Happens for both 6.0 and 8.0 Absolutely a bug