Visual Studio 2017 挂起在 "initializing templates..."
Visual Studio 2017 hangs at "initializing templates..."
这是 VS2017 的 b运行d 新安装(撰写本文时的最新版本 - 15.1 (26403.0))在 Windows (Windows 10 Enterprise 的全新安装上64 位),尚未包含任何扩展或插件。当去文件新项目 VS 只是坐在 'initializing templates...'。我等了二十分钟才强制退出应用程序。
我已经尝试了 devenv /installvstemplates 的命令行参数,但没有帮助。
感谢任何帮助,如果您需要任何其他信息,请告诉我。
更新
我继续解决问题。我 运行 VS 作为管理员进行日志记录,并注意到这些是尝试加载模板时的最终记录条目:
- 在“C:\Program Files (x86)\Microsoft Visual Studio17\Professional\Common7\IDE\ProjectTemplates\CSharp\Windows33\ClassLibrary_WorkerRole.vstemplate”和“C:\Program Files (x86)\Microsoft Visual Studio17\Professional\Common7\IDE\ProjectTemplates\CSharp\Windows33\ClassLibrary\csClassLibrary 中找到具有重复模板 ID 的模板.vstemplate
- 在“C:\Program Files (x86)\Microsoft Visual Studio17\Professional\Common7\IDE\ProjectTemplates\CSharp33\SharedProject\SharedProject.vstemplate”和“C:\Program Files (x86)\Microsoft Visual Studio17\Professional\Common7\IDE\ProjectTemplates\CSharp\Windows33\SharedProject\SharedProject 找到具有重复模板 ID 的模板.vstemplate
- 在“C:\Program Files (x86)\Microsoft Visual Studio17\Professional\Common7\IDE\ProjectTemplates\VisualBasic\Windows33\ClassLibrary_WorkerRole.vstemplate”和“C:\Program Files (x86)\Microsoft Visual Studio17\Professional\Common7\IDE\ProjectTemplates\VisualBasic\Windows33\ClassLibrary\classlibrary 中找到具有重复模板 ID 的模板.vstemplate
- 错误!无法访问文件 (%USER%\AppData\Roaming\Microsoft\VisualStudio.0_ea1722b9\ProjectTemplatesCache\cache.bin)
尽管这是在干净的系统上进行的全新安装,但我确实尝试卸载并重新安装 VS2017,但没有成功。我什至选择了更少的选项以试图减轻重复模板 ID 警告。
我最终不得不再次卸载 VS 2017。卸载 Windows 10 SDK(出于某种原因我有两个版本)。 运行 VS 2017 安装程序作为管理员。
这次安装完成有警告,警告是没有安装.Net Core SDK,因为它说我已经有一个版本,虽然我没有看到。我可能需要稍后处理这个问题,因为可能有一个挂起的注册表项。
不过,我加载了 VS 2017 并立即初始化了模板。这样这个问题就解决了。
这是 VS2017 的 b运行d 新安装(撰写本文时的最新版本 - 15.1 (26403.0))在 Windows (Windows 10 Enterprise 的全新安装上64 位),尚未包含任何扩展或插件。当去文件新项目 VS 只是坐在 'initializing templates...'。我等了二十分钟才强制退出应用程序。
我已经尝试了 devenv /installvstemplates 的命令行参数,但没有帮助。
感谢任何帮助,如果您需要任何其他信息,请告诉我。
更新
我继续解决问题。我 运行 VS 作为管理员进行日志记录,并注意到这些是尝试加载模板时的最终记录条目:
- 在“C:\Program Files (x86)\Microsoft Visual Studio17\Professional\Common7\IDE\ProjectTemplates\CSharp\Windows33\ClassLibrary_WorkerRole.vstemplate”和“C:\Program Files (x86)\Microsoft Visual Studio17\Professional\Common7\IDE\ProjectTemplates\CSharp\Windows33\ClassLibrary\csClassLibrary 中找到具有重复模板 ID 的模板.vstemplate
- 在“C:\Program Files (x86)\Microsoft Visual Studio17\Professional\Common7\IDE\ProjectTemplates\CSharp33\SharedProject\SharedProject.vstemplate”和“C:\Program Files (x86)\Microsoft Visual Studio17\Professional\Common7\IDE\ProjectTemplates\CSharp\Windows33\SharedProject\SharedProject 找到具有重复模板 ID 的模板.vstemplate
- 在“C:\Program Files (x86)\Microsoft Visual Studio17\Professional\Common7\IDE\ProjectTemplates\VisualBasic\Windows33\ClassLibrary_WorkerRole.vstemplate”和“C:\Program Files (x86)\Microsoft Visual Studio17\Professional\Common7\IDE\ProjectTemplates\VisualBasic\Windows33\ClassLibrary\classlibrary 中找到具有重复模板 ID 的模板.vstemplate
- 错误!无法访问文件 (%USER%\AppData\Roaming\Microsoft\VisualStudio.0_ea1722b9\ProjectTemplatesCache\cache.bin)
尽管这是在干净的系统上进行的全新安装,但我确实尝试卸载并重新安装 VS2017,但没有成功。我什至选择了更少的选项以试图减轻重复模板 ID 警告。
我最终不得不再次卸载 VS 2017。卸载 Windows 10 SDK(出于某种原因我有两个版本)。 运行 VS 2017 安装程序作为管理员。
这次安装完成有警告,警告是没有安装.Net Core SDK,因为它说我已经有一个版本,虽然我没有看到。我可能需要稍后处理这个问题,因为可能有一个挂起的注册表项。
不过,我加载了 VS 2017 并立即初始化了模板。这样这个问题就解决了。