Confusing prompt to overwrite tasks upon workspace open results in non-runnable app
See original GitHub issueEnvironment
VS Code 1.74.0 Mac OS Ventura 13.0.1 Functions extension v1.9.0
Repro steps
- Install prerequisites for Azure Dev CLI-enabled application “ToDo App with CSharp Functions and Azure SQL”: https://github.com/Azure-Samples/todo-csharp-sql-swa-func#prerequisites
- Create new empty folder and run
azd init -t todo-csharp-sql-swa-functhere - Open the folder in VS Code.
Expected
Apart from the prompt to restore the .NET API (middle tier) project, there should be no prompts/warnings.
Actual
There is a prompt that says
Detected an Azure Functions Project in folder ‘blah’ that may have been created outside of VS Code. Initialize for optimal use with VS Code?
Who doesn’t want optimal use? You say yes and see another prompt
This will overwrite the following tasks in your tasks.json: “func: host start”
This is confusing: there is no task “func: host start” in tasks.json. What the extension refers to is a task that is part of the template, which is labeled “API Functions Run”. If a task to be overwritten has a label, the extension should use the label for prompting.
If the user says yes, the task will be overwritten. Unfortunately this task is used by other tasks, and the end result is that the user loses ability to run the app locally.
What I really want
An ability for this template to “tell” Azure Functions extension that it is complete with regards to Azure Functions-related tasks, and that it should not offer to update/overwrite tasks.json file. Is there such a mechanism?
Issue Analytics
- State:
- Created 9 months ago
- Comments:6 (2 by maintainers)

Top Related StackOverflow Question
The suggestion works ☺️ PR submitted https://github.com/Azure/azure-dev/pull/1280 That said, for the Functions ext, you still might want to consider whether to improve the project detection logic, and as a minimum, use the task label when prompting the user to update tasks.
@nturinski thank you. Will try
projectRuntimeandprojectLanguagesettings.