I wrote an application using Visual Studio 2010 that I configured to run using the 3.5 framework.
I then checked in this project and had a coworker, who is using Visual Studio 2008, grab the project. He then started getting an error that says it could not find file \Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets emphasis on the v10.0.
First off, why is it trying to reference a 2010 directory when I converted it to 3.5? Shouldn’t it run on a machine that does not have VS 2010 installed?
Secondly, what is Microsoft.WebApplication.targets and why do I need it?
Because the v10.0 (second) path is not present in machines that do not have V2010 installed, VS2008 was unable to load the project.
vs 2008 path-
vs 2010 path-
but if u want to run it in both the installations, do as under-
Step1:
Add the V10.0 path before the V9.0 MSBuild extension path with a Condition property to check for the file based on the Solution Version.
Here is we do not specify the Visual Studio 2010 MSBuild extension path first the Visual Studio will try to upgrade the project.
Step2:
After the project file upgrade VS2010 would have changed the FileUpgradeFlags tags value to 0, which would again trigger an upgrade. Remove the Zero from the tag.
Save the project file and reload. Now you will be able to load the project in VS2010 & VS2008 (Even if VS2010 is not installed) without any problem.