I wanted to split out my controllers from my main application to a dedicated DLL for my MVC3 application. But after doing so I lost all my MVC3 tooling support. After some digging, I discovered that if you wish to retain the tooling support for MVC3 while working in a non Web Application Project, you just need to add the appropriate information to the project file.
Share
Either unload your project from VS first by right clicking on it and clicking on “Unload Project” or edit it outside of visual studio in any plain text editor. If using VS, after unloading the project, right click on the project file again and choose to edit it.
In the file you should see an element in the first PropertyGroup called
<ProjectGuid>. Just below this element create a new element called<ProjectTypeGuids>. Inside of this element put in the GUID for the MVC3 project type. You MUST also add a project type indicating the language of the library, either VB or C#, in my case it’s C#. Failing to also add this GUId will cause VS to show an error when you try to reload the project.MVC3 and C#
MVC3 and VB.NET
Reload the project after saving the changes and you should be good to go!