Visual-studio – “Missing web components” error when opening MVC3 project in Visual Studio 11 Beta

asp.net-mvc-3asp.net-webpagesrazorvisual studioweb-platform-installer

When I open a solution containing an MVC3 project in Visual Studio 11 Beta, I see the following message:

The Web project 'Landboss.Web' requires missing web components to run with Visual Studio. Would you like to download and install them using the Web Platform Installer now? (Note: Some components might require restart to take effect.) ASP.NET Web pages with Razor syntax 1.0.0.0

The Web project 'Landboss.Web' requires missing web components to run
with Visual Studio. Would you like to download and install them using
the Web Platform Installer now? (Note: Some components might require
restart to take effect.)

ASP.NET Web pages with Razor syntax 1.0.0.0

When I click Yes, the Web Platform Installer opens and tells me this:

enter image description here

The product you are trying to install is not supported on your
operating system. Click here for more information.

So far I've installed Visual Studio 11 Beta on two machines and both have this same problem.

Best Answer

I believe this was caused by the fact that I had previously installed Visual Studio 11 Developer Preview. I did uninstall it before installing the Beta, but you know how that goes.

To fix it, I did the following:

  1. Uninstalled "Microsoft ASP.NET MVC 3 - Visual Studio 11 Tools Update"
  2. Uninstalled "Microsoft ASP.NET Web Pages - Visual Studio 11 Tools"
  3. Ran the Visual Studio 11 Beta "Repair" from the installation ISO.

It worked! Razor syntax highlighting and intellisense are back, and the warning message no longer shows when I open the project.