简体   繁体   English

Visual Studio 2022 Create Azure TimeTrigger function 导致没有文件的空解决方案

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

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).当我尝试从“新解决方案”模板创建“定时器触发器”应用时,Visual Studio Professional 2022(创建新项目 -> Azure 函数 -> 定时器触发器)创建空解决方案(0 个项目)。 This happens when I try to create a project based on any of the Azure function templates.当我尝试基于 Azure function 模板中的任何一个创建项目时,就会发生这种情况。 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.卸载然后重新安装 Visual Studio,这并没有解决问题。
  2. Removing and adding again Azure Development tools from VS Installer.从 VS 安装程序中删除并再次添加 Azure 开发工具。
  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)以不同的方式安装 azure 工具: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.按照 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: *.sln 文件如下所示:

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. Microsoft 支持团队解决了这个问题。 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.最后,我在另一台计算机上安装了 Visual Studio,它运行没有任何问题。 As a result I decided to reimage my PC.因此,我决定重新映像我的 PC。 After reimage Visual Studio worked as expected.重新映像 Visual Studio 后按预期工作。

Have you tried removing and adding again Azure Development tools from VS Installer.您是否尝试过从 VS 安装程序中删除并再次添加 Azure 开发工具。

It looks like this is fixed in the latest version of Visual Studio 2022 (17.1.1).看起来这是在最新版本的 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更新至 17.1.1
  2. Delete AzureFunctionsTemplate.vstemplate删除 AzureFunctionsTemplate.vstemplate
  3. Run a repair of Visual Studio运行 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.我比较了处理前后的 vstemplate 文件,它 100% 相同,因此无需删除模板文件即可进行修复。

This problem wound up with a Microsoft Support team. Microsoft 支持团队解决了这个问题。 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.最后,我在另一台计算机上安装了 Visual Studio,它运行没有任何问题。 As a result I decided to reimage my PC.因此,我决定重新映像我的 PC。 After reimage Visual Studio worked as expected.重新映像 Visual Studio 后按预期工作。

This isn't really an answer.这不是真正的答案。 More for the next person who comes to Stack who is experiencing this problem.对于遇到此问题的下一个来到 Stack 的人来说,更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从 Visual Studio 2022 调试 Azure Function 应用程序 - Debug Azure Function App from Visual Studio 2022 Azure 功能未显示在 visual studio 2022 中的“添加新项目”下 - Azure functions not showing under "Add new item" in visual studio 2022 无法使用 Visual Studio 发布 Azure Function:禁用创建按钮 - Publishing Azure Function using Visual Studio not possible: Create button disabled Visual Studio 2022 发布 window 警告我有关 Azure 应用服务不支持 Win-x64 - Visual Studio 2022 Publish window warning me about Azure App Service not supporting Win-x64 如何在 Visual Studio 中使用主机密钥授权创建 azure function? - How can I create an azure function with Host Key authorization in Visual Studio? 部署逻辑应用程序 visual studio 2022 - deploy logic apps visual studio 2022 Visual Studio Professional 2022 将 Azure 函数的默认模板放在哪里? - Where does Visual Studio Professional 2022 put the default templates for Azure Functions? 了解Visual Studio中Azure function blob模板的步骤 - Understanding steps of the Azure function blob template in Visual Studio 无法使用 Visual Studio Code 调试 Azure JavaScript Function - Can't Debug Azure JavaScript Function using Visual Studio Code AWS Toolkit for Visual Studio 2022 部署失败 lambda - AWS Toolkit for Visual Studio 2022 failing on deploy lambda
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM