4

Using Visual Studio 2010, MVC 3 (release version) I'm getting this error when opening a specific project which was a traditional web forms project to which I've added MVC:

"The Web project '' requires missing web components to run with Visual Studio. Would you like to download and install the using the Web Platform Installer now?

ASP.NET Web pages with Razor syntax."

  • I have MVC installed and fully running. Other pure MVC and another mixed Web Forms/MVC project open without any issue.
  • Clicking "Yes" appears to go through downloading and installing, but the error remains.
  • Clicking "No" opens the project, where I have intellisense and syntax highlighting for Razor, all my MVC context items (Add View, Add Controller, etc.). In short, everything appears to be working just fine except for what appears to be a bogus error message.

I've done a file compare of the sln, csproj and web.config files and added everything that appears relevant. Prior to doing that I was missing some entries in ProjectTypeGuids the addition of which got the MVC context menus and Razor intellisense working. I tried resetting the ProjectGuid but I still get the error.

I have also previously gone through uninstalling MVC3, MVC2, ASP.NET Web Pages, repairing Visual Studio, installing MVC 3 from the stand-alone installer, and probably a couple more things. I have not yet tried a full system reinstall. I am working from a relatively clean Windows 7 installation. It was a fresh setup about 2 weeks ago and only VS 2010 has been installed (no older versions or betas).

I'm out of ideas at this point. Anyone got any suggestions? I'm a bit confused since this is project-specific, yet the error message indicates that the problem is with Visual Studio.

Update: it gets a little more interesting. Another developer was able to open the same project on his machine without any errors or warnings. So it's something specific to this project on my workstation. At this point I'm willing to write it off as some obscure edge-case bug.

Update 2: And now after rebooting for a system update it's working on my workstation. Definitely some sort of edge-case, and definitely not something I can reproduce.

Colin Young
  • 3,018
  • 1
  • 22
  • 46
  • It may be using a project guid from an older MVC maybe? Try creating a new project and using the project guid (if different) in your problematic csproj file. An issue I had previously was where the visual web developer wasn't installed but you say that other asp.net projects *are* opening so it probably isn't going to be *that*. – Eben Roux Jun 14 '12 at 12:45
  • Doesn't seem likely. I did most of the MVC work manually by merging the .sln and .config files from a known-good MVC 3 project. Anyway, see my updates, the problem has gone away. Good old Windows. If in doubt, reboot :) – Colin Young Jun 14 '12 at 13:10

1 Answers1

1

You can see from the updates, that the problem has gone away after a system-update prompted reboot. So if anyone else has ended up here with a similar problem and you've gone through all the other possibilities, try rebooting.

Colin Young
  • 3,018
  • 1
  • 22
  • 46
  • This actually fits in with another problem I'd seen lately. I'd provisioned a new Windows server and hosted a MVC4/ASP.NET 4.5 application on it. When I later needed to host something under MVC3, this dependency was missing. After installing MVC3 through Web PI, it was still missing. However, after a reboot it had started working. Would've been nice if it recommended a reboot! – Richard Jun 14 '12 at 14:40