Visual Studio 2022 Create Azure TimeTrigger function results in empty solution with no files

Viewed 286

When I try to create a 'Timer Trigger' app from the 'New Solution' template Visual Studio Professional 2022 (Create New Project -> Azure Functions -> Timer Trigger) creates empty solution (0 Projects). This happens when I try to create a project based on any of the Azure function templates. There isn't any error given and I'm not sure what to do. Any thoughts on how I might resolve this problem?

What I've tried so far:

  1. Uninstalling then reinstalling Visual Studio and this didn't fix the problem.
  2. Removing and adding again Azure Development tools from VS Installer.
  3. Installing azure tools a different way: https://github.com/Azure/azure-functions-core-tools/issues/1872 (npm i -g azure-functions-core-tools@4 --unsafe-perm true)
  4. Running the command line uninstaller as directed by Microsoft Tech Support Chat.

More information: The resulting solution is empty and there is no project or files generated. Here is what the *.sln file looks like:

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32210.238
MinimumVisualStudioVersion = 10.0.40219.1
Global
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
    GlobalSection(ExtensibilityGlobals) = postSolution
        SolutionGuid = {6DC061D5-7D34-4A91-9A50-47AC1A22F53C}
    EndGlobalSection
EndGlobal

This problem wound up with a Microsoft Support team. We installed and reinstalled multiple times to no effect. In the end I installed Visual Studio on another computer and it ran with no problems whatsoever. As a result I decided to reimage my PC. After reimage Visual Studio worked as expected.

3 Answers

Have you tried removing and adding again Azure Development tools from VS Installer.

It looks like this is fixed in the latest version of Visual Studio 2022 (17.1.1). In order to get the template working for me again I had to do the following:

  1. Update to 17.1.1
  2. Delete AzureFunctionsTemplate.vstemplate
  3. Run a repair of Visual Studio
  4. Reboot

I compared the vstemplate file from before and after the process and it was 100% the same so a repair might work without having to delete the template file.

This problem wound up with a Microsoft Support team. We installed and reinstalled multiple times to no effect. In the end I installed Visual Studio on another computer and it ran with no problems whatsoever. As a result I decided to reimage my PC. After reimage Visual Studio worked as expected.

This isn't really an answer. More for the next person who comes to Stack who is experiencing this problem.

Related