如何获取“添加控制器”,在我的ASP.NET MVC 5项目“添加视图”菜单选项? [英] How do I get the “Add Controller” and “Add View” menu options in my ASP.NET MVC 5 project?
问题描述
我在Visual Studio 2012中使用<评级从MVC 4我的解决方案,以MVC 5 href=\"http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2\"相对=nofollow>本教程。的最后一步我删除了ProjectTypeGuid为MVC 4从我的 .csproj的
文件。
现在的问题是,我没有看到<大骨节病>添加控制器骨节病>,<大骨节病>添加在Visual Studio中查看骨节病>当我想创造新的控制器/浏览次数。
我读<一个href=\"http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2\"相对=nofollow>这个答案MVC 4 ,所以我知道我需要获得MVC 5正确ProjectTypeGuid以恢复该功能。我想知道如果任何人知道那是什么,这样我可以将它们添加到我的 .csproj的
文件?
安装下列项目:
- 的Visual Studio 2012更新4
- Web工具2013.1为Visual Studio 2012( Web平台安装 | <一个href=\"http://download.microsoft.com/download/6/A/8/6A894BC6-3C60-42B5-8246-5EF7918FD852/AspNetWebTools2013_1Setup.exe\">Direct下载)
然后按照<一href=\"http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2\">this教程升级您的MVC 4项目MVC 5 。
最后,请确保您的项目有以下ProjectTypeGuids:
&LT; ProjectTypeGuids&GT;
{349c5851-65df-11DA-9384-00065b846f21} {fae04ec0-301f-11D3-bf4b-00c04f79efbc}
&LT; / ProjectTypeGuids&GT;
在MVC5您正在寻找的选项可能会在<大骨节病>添加脚手架骨节病>菜单选项下被隐藏。请参见发行博客<一href=\"http://blogs.msdn.com/b/webdev/archive/2013/11/18/announcing-release-of-asp-net-and-web-tools-2013-1-for-visual-studio-2012.aspx\">post对MVC5脚手架的更多信息。
http://forums.asp.net/t/1950055.aspx <:
从收集的一些信息/ p>
I upgraded my solution from MVC 4 to MVC 5 in Visual Studio 2012 using this tutorial. In the last step I removed the ProjectTypeGuid for MVC 4 from my .csproj
file.
Now the problem is that I don't see Add Controller, Add View in Visual Studio when I want to create new Controllers/Views.
I read this answer for MVC 4 so I know I need to get the correct ProjectTypeGuid for MVC 5 in order to regain that functionality. I was wondering if anyone knows what that is so that I can add them to my .csproj
file?
Install the following items:
- Visual Studio 2012 Update 4
- Web Tools 2013.1 for Visual Studio 2012 (Web Platform Installer | Direct Download)
Then follow this tutorial to upgrade your MVC 4 project to MVC 5.
Finally make sure your project has the following ProjectTypeGuids:
<ProjectTypeGuids>
{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
</ProjectTypeGuids>
In MVC5 the option you're looking for might be hidden under the Add Scaffold menu option. See the release blog post for more information on MVC5 scaffolding.
Some information gathered from: http://forums.asp.net/t/1950055.aspx
这篇关于如何获取“添加控制器”,在我的ASP.NET MVC 5项目“添加视图”菜单选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!