原文地址:http://www.cnblogs.com/welland/archive/2009/02/10/1194212.html
使 Web Application 项目文件能同时被 VS2005 和 VS2008 打开的方法
VS2005建立的Web Application项目,升级到VS2008后,就无法再用VS2005打开了。
要使WebApplication项目文件兼容VS2005和VS2008,需在.csproj文件中找到如下一行:
<
ImportProject
="$(MSBuildExtensionsPath)/Microsoft/VisualStudio/v9.0/WebApplications/Microsoft.WebApplication.targets"
/>
升级之前是:
<
ImportProject
="$(MSBuildExtensionsPath)/Microsoft/VisualStudio/v8.0/WebApplications/Microsoft.WebApplication.targets"
/>
如果要同时兼容VS2005和VS2008,必须改为:
<
ImportProject
="$(MSBuildExtensionsPath)/Microsoft/VisualStudio/v9.0/WebApplications/Microsoft.WebApplication.targets"
Condition
="'$(Solutions.VSVersion)' == '9.0'"
/>
< Import Project ="$(MSBuildExtensionsPath)/Microsoft/VisualStudio/v8.0/WebApplications/Microsoft.WebApplication.targets" Condition ="'$(Solutions.VSVersion)' == '8.0'" />
< Import Project ="$(MSBuildExtensionsPath)/Microsoft/VisualStudio/v8.0/WebApplications/Microsoft.WebApplication.targets" Condition ="'$(Solutions.VSVersion)' == '8.0'" />