Retaining tooling support for DLL projects containing MVC3 Controllers

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.

Answers


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#

<ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

MVC3 and VB.NET

<ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>

Reload the project after saving the changes and you should be good to go!


Need Your Help

Asynchronous dispatch resource hog in Swift

osx swift user-interface asynchronous

I am fairly new to the Swift programming language, making GUIs, and to using asynchronous dispatches in general, so please forgive this question which — I'd imagine — has an excruciatingly simple a...

How to get value in XML using Java?

java xml dom xpath xml-parsing

I have tried a lot of times but I did not how to retrive a value from XML using Java. I tried to use DOM and Xpath. Please help. I can use a String Writer to printout the XML so I know the XML i...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.