visual-studio 在 Visual Studio 中创建新项目时没有可用的模板
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1643357/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
No templates available when creating a new project in Visual Studio
提问by D. Veloper
"No template information found. See the application log in Event Viewer for more details. To open Event Viewer, click Start, click Control Panel, double-click Administrative Tools, and then double-click Event Viewer."
“未找到模板信息。有关详细信息,请参阅事件查看器中的应用程序日志。要打开事件查看器,请单击开始,单击控制面板,双击管理工具,然后双击事件查看器。”
That's the error message I get when I try to create a new project or solution. How can this be resolved?
这是我尝试创建新项目或解决方案时收到的错误消息。如何解决这个问题?
回答by D. Veloper
I used a solution presented to me from other sites. One of them said to reinstall templates. I did the following:
我使用了其他网站提供给我的解决方案。其中一个说要重新安装模板。我做了以下事情:
In the command prompt I typed: cd C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
在命令提示符中我输入:cd C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
Then I typed: devenv /installvstemplates
然后我输入:devenv /installvstemplates
I took a minute but after it completed I opened Visual Studio and tried to create a new project. All my project templates were back in order, including additional templates like Workflow, SharePoint and Silverlight.
我花了一分钟,但完成后我打开 Visual Studio 并尝试创建一个新项目。我的所有项目模板都恢复原状,包括其他模板,如工作流、SharePoint 和 Silverlight。
回答by prince bhalani
Start Menu --> Microsoft Visual Studio 2008 --> Visual Studio Tools. Right-click over the Visual Studio Command Prompt shortcut and make sure you select Run as Administrator.Once the VS Command Prompt comes up, execute the command without Quot,
开始菜单 --> Microsoft Visual Studio 2008 --> Visual Studio 工具。右键单击 Visual Studio 命令提示符快捷方式,并确保选择以管理员身份运行。一旦 VS 命令提示符出现,不带 Quot 执行命令,
"devenv /installvstemplates"
"devenv /resetsettings"
And that worked out.
“devenv /installvstemplates”
“开发环境/重置设置”
这成功了。
回答by Mukund
Run Following command and it will restore templates. C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE>devenv /installvstemplates
运行以下命令,它将恢复模板。C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE>devenv /installvstemplates
回答by d219
This may not match the original posters exact symptoms but I was seeing a blank screen after clicking Create a new project(VS 2019). Discovered that the install of Visual Studio had 'finished with errors' (paraphrasing there - now I've fixed the issue I can't see the exact error message) anyhow digging into it I found that the C++ redistributable had not installed (even though I'm a C# dev that's still important to VS!)
这可能与原始海报的确切症状不符,但在单击创建新项目(VS 2019)后,我看到了一个空白屏幕。发现 Visual Studio 的安装“以错误结束”(在那里解释 - 现在我已经解决了这个问题,我看不到确切的错误消息)无论如何深入研究我发现 C++ 可再发行组件尚未安装(即使我是一名 C# 开发人员,这对 VS 仍然很重要!)
If I tried to install this as a standalone I got an Access Deniederror (even if running as Administrator). Digging into the VS install logs I found a similar report.
如果我尝试将其作为独立安装,则会收到拒绝访问错误(即使以管理员身份运行)。深入研究 VS 安装日志,我发现了类似的报告。
Anyhow after a fair amount of Googling a few responses pointed to Virus software preventing the C++ redistributable from installing (in my case McAfee). Once that was removed a repair of VS resolved the issue :)
无论如何,经过大量的谷歌搜索后,一些回复指出病毒软件阻止了 C++ 可再发行组件的安装(在我的情况下是 McAfee)。一旦删除了 VS 的修复,问题就解决了 :)

