asp.net-mvc Visual Studio 2013 - 未安装 Visual Basic/Visual C# Web 模板
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20823499/
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
Visual Studio 2013 - No Visual Basic/Visual C# Web Templates Installed
提问by doodelicious
I've installed Visual Studio 2013 Premium (MSDN license) on my machine. Yet, the ASP.NET Web Application template is not there (except for Version2012, which offers me MVC 4, see screenshot below):
我已经在我的机器上安装了 Visual Studio 2013 Premium(MSDN 许可证)。然而,ASP.NET Web 应用程序模板并不存在(Version2012 除外,它为我提供了 MVC 4,请参见下面的屏幕截图):


I have uninstalled and reinstalled VS2013 three times now. I've deleted the ItemTemplatesCache and ProjectTemplatesCache folders along with running the devenv /InstallVSTemplates and devenv /Setup to no avail. I've also checked to make sure web developer tools are installed. Under the \Common7\IDE\ProjectTemplatesCache\CSharp\Web folder, I only see MVC 4 template files. Am I missing something? An extension or additional program?
我现在已经卸载并重新安装了 3 次 VS2013。我已经删除了 ItemTemplatesCache 和 ProjectTemplatesCache 文件夹以及运行 devenv /InstallVSTemplates 和 devenv /Setup 无济于事。我还检查过以确保安装了 Web 开发人员工具。在 \Common7\IDE\ProjectTemplatesCache\CSharp\Web 文件夹下,我只看到 MVC 4 模板文件。我错过了什么吗?扩展或附加程序?
Below I added a screenshot of the frameworks I have installed. Any direction or advice would be appreciated. Thank you!
下面我添加了我已安装的框架的屏幕截图。任何方向或建议将不胜感激。谢谢!


Jodie.
朱迪。
采纳答案by doodelicious
After many hours of troubleshooting, these are the steps I took to fix the issue (on Windows 7 Ultimate). I assumed it was an issue with a corrupt installation and possible problems with registry keys, so I removed any and all Microsoft development tools using the following steps:
经过数小时的故障排除后,这些是我解决问题所采取的步骤(在 Windows 7 Ultimate 上)。我认为这是安装损坏的问题以及注册表项可能存在的问题,因此我使用以下步骤删除了所有 Microsoft 开发工具:
- FULL VIRUS SCAN (just to make sure this was not related to a virus or malware). I used Microsoft Security Essentials
- Downloaded Microsoft FixItto help clean up registry keys as I deleted programs. After I deleted any program or program updates, I ran this tool to verify a clean uninstall had been done
- Visual Studio 2010 - Ran the Visual Studio 2010 Uninstall Utilityand removed the program. Went into Control Panel > Programs > Uninstall a program > View Installed Updates and searched for 'Visual Studio 2010', then removed any updates associated with VS2010 (and ran the FixIt program after every uninstall to verify the registry keys had been wiped)
- Followed this MSDN postto remove Visual Studio 2012 (paying particular attention to the 'Optional Shared Packages' and removed any and all programs under this list, again running Microsoft FixIt to verify the registry keys were wiped)
- Followed this blog post from Shawn Harrisonto remove all SQL server; also referenced these two MSDN posts Uninstall an Existing Instance of SQL Server (Setup)and SQL Server Files Left After Uninstall
- Uninstalled Visual Studio 2013, along with all references to 'Visual Studio 2013' in programs and installed updates; used FixIt to clean up registry keys after every install
- Last but not least, I removed all MVC Visual Studio-related tools, references extensions including Web Tools and Web Platform Installer
- 完整的病毒扫描(只是为了确保这与病毒或恶意软件无关)。我使用了 Microsoft Security Essentials
- 下载了Microsoft FixIt以在我删除程序时帮助清理注册表项。删除任何程序或程序更新后,我运行此工具以验证是否已完成干净卸载
- Visual Studio 2010 - 运行Visual Studio 2010 卸载实用程序并删除该程序。进入控制面板 > 程序 > 卸载程序 > 查看已安装的更新并搜索“Visual Studio 2010”,然后删除与 VS2010 相关的所有更新(并在每次卸载后运行 FixIt 程序以验证注册表项已被擦除)
- 按照此 MSDN 帖子删除 Visual Studio 2012(特别注意“可选共享包”并删除此列表下的所有程序,再次运行 Microsoft FixIt 以验证注册表项已被擦除)
- 按照Shawn Harrison 的这篇博文删除所有 SQL 服务器;还引用了这两篇 MSDN 帖子卸载 SQL Server 的现有实例(安装程序)和卸载后留下的 SQL Server 文件
- 卸载了 Visual Studio 2013,以及程序和已安装更新中对“Visual Studio 2013”的所有引用;每次安装后使用 FixIt 清理注册表项
- 最后但并非最不重要的是,我删除了所有与 MVC Visual Studio 相关的工具,引用了包括 Web 工具和 Web 平台安装程序在内的扩展
This solved my problem with missing templates :)
这解决了我缺少模板的问题:)
(I'm soooooooo grateful this was all done on an SSD, however, I think it would have taken 5x longer with an old-spinning HD)
(我非常感谢这一切都是在 SSD 上完成的,但是,我认为使用旧式 HD 会花费 5 倍的时间)
Cheers, everyone!
干杯,大家!
回答by Funbit
I think that "Re-install Visual Studio from scratch" is not a solution.
我认为“从头开始重新安装 Visual Studio”不是解决方案。
I have faced with the described problem and found much faster way to fix it:
我遇到了所描述的问题,并找到了更快的解决方法:
- First of all, try to repair Visual Studio installation (in "Control Panel\Programs\Programs and Features"find your Visual Studio, right-click and select "Repair"). Reboot after (!).
- Check if template appeared in the Visual Studio. If not, then: in the "Control Panel\Programs\Programs and Features"make sure that you have "Microsoft Web Platform Installer 4.x"installed (I have 4.6 version). If not - install it from here: http://www.microsoft.com/web/downloads/platform.aspx
- Run "Web Platform Installer"(it should be here: "%ProgramFiles%\Microsoft\Web Platform Installer\WebPlatformInstaller.exe")
- On the "Products" tab find the line "Microsoft ASP.NET and Web Tools 2013.1 for Visual Studio 2013"(make sure that it is not for 2012!). If line has "Add" button on the right side enabled, then click it and install the tools. Reboot PC (!) and you should have your ASP.NET project template back.
- If line says "Installed", then you should repair it via "Control Panel\Programs\Programs and Features", just find "Microsoft ASP.NET and Web Tools 2013.1 -Visual Studio 2013", right-click and select "Repair"). Reboot PC (!) and you should have your ASP.NET project template back!
- 首先,尝试修复 Visual Studio 安装(在“控制面板\程序\程序和功能”中找到您的 Visual Studio,右键单击并选择“修复”)。在 (!) 后重新启动。
- 检查模板是否出现在 Visual Studio 中。如果没有,则:在“控制面板\程序\程序和功能”中,确保已安装“Microsoft Web Platform Installer 4.x”(我有 4.6 版本)。如果没有 - 从这里安装它:http: //www.microsoft.com/web/downloads/platform.aspx
- 运行“Web 平台安装程序”(它应该在这里:“%ProgramFiles%\Microsoft\Web Platform Installer\WebPlatformInstaller.exe”)
- 在“产品”选项卡上,找到“Microsoft ASP.NET and Web Tools 2013.1 for Visual Studio 2013”行(确保它不是 2012!)。如果行右侧启用了“添加”按钮,则单击它并安装工具。重新启动 PC (!),您应该恢复 ASP.NET 项目模板。
- 如果行显示“已安装”,则应通过“控制面板\程序\程序和功能”修复它,只需找到“Microsoft ASP.NET and Web Tools 2013.1 -Visual Studio 2013”,右键单击并选择“修复”) . 重新启动 PC (!),您应该可以恢复 ASP.NET 项目模板!
Cheers!
干杯!
回答by Tybs
Not the solution in your case, but I had a similar issue where I could not find the MVC templates. Eventually I realized that I still had .NET Framework 3.5 selected, which of course does not provide MVC... switching to .NET Framework 4.5 let me find the MVC templates again.
不是您的情况的解决方案,但我遇到了类似的问题,找不到 MVC 模板。最终我意识到我仍然选择了 .NET Framework 3.5,这当然不提供 MVC...切换到 .NET Framework 4.5 让我再次找到 MVC 模板。
You already had 4.5 selected in the screenshot, but I'm just posting this here for others who might make the same mistake as I did.
您已经在屏幕截图中选择了 4.5,但我只是将其发布在这里供其他可能会犯同样错误的人使用。
回答by Jens
Don't forget to check that "Microsoft Web Developer Tool" was actually enabled during installation see this related stackoverflow question: How do I open a csproj with ProjectTypeGuids 349c5851-65df-11da-9384-00065b846f21?"Microsoft Web Developer Tool" that was the problem for me
不要忘记检查在安装过程中是否实际启用了“Microsoft Web Developer Tool”,请参阅此相关的 stackoverflow 问题:How do I open a csproj with ProjectTypeGuids 349c5851-65df-11da-9384-00065b846f21? “Microsoft Web Developer Tool”对我来说是个问题
回答by Jens
Have you tried updating the gallery Tools>Extension and updates> Templates
您是否尝试过更新库工具>扩展和更新>模板
To get up and running you could click Version 2012 under Web and get to the stock web applications templates which will provide you upto MVC 4 For MVC 5 you can either download Visual Studio 2013 Express Web, it roughly has the same ASP.NET features at Premium on MSDN License.
要启动并运行,您可以单击 Web 下的 Version 2012 并访问库存 Web 应用程序模板,该模板将为您提供高达 MVC 4 对于 MVC 5,您可以下载 Visual Studio 2013 Express Web,它大致具有相同的 ASP.NET 功能,位于高级 MSDN 许可证。
回答by adam
Update for Studio 2013: Make sure you install express for Windows and not express for Windows Desktop. The Desktop version does not have the Web templates.
Studio 2013 更新:确保为 Windows 安装 express,而不是为 Windows Desktop 安装 express。桌面版没有 Web 模板。
回答by Lamb Of Zod
I had a similar issue with VS 2013 Web Express Update 3. After reinstalling stuff all week its fixed. I had to uninstall VS, delete the "Microsoft Visual Studio 12.0" directory, and reinstall VS. There are other workaroundsthat are more precise.
我在 VS 2013 Web Express Update 3 中遇到了类似的问题。在整个星期重新安装东西后,它已修复。我不得不卸载 VS,删除“Microsoft Visual Studio 12.0”目录,然后重新安装 VS。还有其他更精确的解决方法。

