Let’s say your’re trying to run your MVC application in Visual Studio, but you get the error in the subject line whether you run it with our without debugging. If you search for a solution to the problem, just about all you’ll see over and over is to set your Web project as the ‘Startup Project’. In rare cases, this may not be the solution to the problem.

I finally found a fix to this problem as sort of a fluke. I created a brand new ‘throw away’ MVC project and opened up the web project in Notepad. I copied the ProjectTypeGuids tag from that project and pasted it (replacing the old one) into the old project.

Voila – that fixed the problem!