Can’t open Asp.Net MVC2 project in Visual Studio 2010 – Microsoft.WebApplication.targets was not found

You try to open an MVC2 project that worked on a previous machine but won't open on your new machine? The error message you get when you try to open the project is:

error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

Possibly your new machine has never had Visual Studio 2008 on it, whereas your old machine did. In which case the solutions is:

  1. Find a machine on which VS2008 has been installed
  2. Copy the contents of C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications to your new machine

References

http://www.matthidinger.com/archive/2008/11/09/fixing-web-application-projects-with-automated-tfs-builds.aspx

Can’t open Asp.Net MVC2 project in…

by Chris F Carroll read it in 1 min
0