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
Had the same problem with VS2015, helped changing ProjectTypeGuids content to:
{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
Are those only available to ASP.NET MVC template?
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:
<ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
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.
I am on VS2012 and tried Dimitrov's answer (adding a particular GUID to the project file's ProjectTypeGuids). While this did give me the missing context menu for the controller actions, I was missing intellisense on my Razor pages.
It turns out I was missing the VS tooling for the version of the MVC project I was working on, and installing this tooling (rather than editing the project file) resolved my issues.
Download page for ASP.NET and Web Tools 2013.1 for Visual Studio 2012
I found this download link from the following blog post:
Announcing release of ASP.NET and Web Tools 2013.1 for Visual Studio 2012
For people using MVC 5, add this key
{E3E379DF-F4C6-4180-9B81-6769533ABE47};
in the beginning of . The other guids won't work.
When all else fails (before reinstalling VS2015) you might want to reset VS cache. This worked for me (after repairing - NOT meddling with GUIDS). Just delete the contents in the folders mentioned in this link (takes about 30 seconds), then execute the command. That takes another 10 seconds. Restart VS and you will see the screens of a first-time user in VS. It worked like a charm.
http://blogs.msdn.com/b/willy-peter_schaub/archive/2010/09/15/if-you-have-problems-with-tfs-or-visual-studio-flush-the-user-cache-or-not.aspx