I have integrated ASP.NET MVC 4 into existing asp.net web site. Both works fine but I don't see any menu/shortcuts to create controller/view within visual studio IDE. Are those only available to ASP.NET MVC template?
Asp.net-mvc – Context menu to Add Controller/View missing
asp.netasp.net-mvcasp.net-mvc-4visual studiovisual studio 2010
Related Topic
- C# – The breakpoint will not currently be hit. No symbols have been loaded for this document in a Silverlight application
- C# – Login failed for user ‘IIS APPPOOL\ASP.NET v4.0’
- Asp.net-mvc – Difference between ApiController and Controller in ASP.NET MVC
- Asp.net-mvc – MVC 4 @Scripts “does not exist”
- Asp.net-mvc – Visual Studio debugging/loading very slow
- Visual-studio – Unable to launch the IIS Express Web server
- Asp.net-mvc – No Add Controller on menu and can’t add a View either in MVC 4.5
Best Answer
Yes, but you could cheat. The way Visual Studio shows those shortcuts is by looking at the project type and if it sees that it is an ASP.NET MVC project it will make them available. But how does it know it is an ASP.NET MVC project? After all ASP.NET MVC is an ASP.NET project.
Open the
.csproj
file and look for the<ProjectTypeGuids>
node of your ASP.NET MVC 4 project. You will see something like this:Now open the
.csproj
file of your regular ASP.NET project and simply add the{E3E379DF-F4C6-4180-9B81-6769533ABE47}
GUID as first item in the list (if you don't project does not even load). That's all. Now you will see the ASP.NET MVC specific context menus in your WebForms project.