Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Missing web components" error when opening MVC3 project in Visual Studio 11 Beta

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.

like image 583
joshuapoehls Avatar asked Mar 01 '12 16:03

joshuapoehls


2 Answers

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.

like image 108
joshuapoehls Avatar answered Oct 21 '22 20:10

joshuapoehls


This is related to the configuration setting webpages:Version

[appSettings]
...
   [add key="webpages:Version" value="x.0.0.0" /]
...
[/appSettings]

if you have multiple versions of razor on the system (1 or 2 for now), better add this setting if it's missing. Choose the version you want/need at the appropriate level. (Obviously replace the brackets...)

like image 29
Costas Avatar answered Oct 21 '22 20:10

Costas