(UPDATED 2/26/2011 with higlighted information) I previously blogged on running ASP.Net MVC in an ASP.Net WebForms project. My reference at the time was a freely-available PDF document by Scott Guthrie which covered the setup process in good detail.
Moreover, Scott later followed-up with a
blog showing how to leverage NuGet to automate the setup of ASP.Net MVC3 in an existing ASP.Net WebForms project.
One frequent question that usually comes up when discussing this side-by-side setup is the loss of the convenient Visual Studio Solution Explorer context menu which enable us to easily create controllers and views with a few mouse clicks.
A good suggestion brought up in the comments section of Scott’s article presented a good work-around to this problem: Manually add the MVC Visual Studio Project Type GUID in your .csproj project file ({E53F8FEA-EAE0-44A6-8774-FFD645390401}) which then brings back the MVC-specific context menu functionality in solution explorer of the hybrid project. (Thanks James Raden!)
Below is how James presented his solution. Note that I was only able to get this to work when I added the project Type GUID at the beginning of the GUID list.
<ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>