轉 vs2010轉vs2008 其餘的同樣

若是你使用VS2010的任何版本寫代碼,那麼在VS2008中就不能打開VS2010的解決方案了,爲此,經過如下三步就能夠解決了
一.對於工程名.sln;
 1.用你喜歡的編輯器打開sln文件,好比notepad++編輯器

 2.找到下面的字符串
Microsoft Visual Studio Solution File, Format Version 11.00.
# Visual Studio 2010.
而且用下面的字串替換
Microsoft Visual Studio Solution File, Format Version 10.00. (I)
# Visual Studio 2008. (II, 可選)
二.對於工程名.csproj/vbproj
1.用你喜歡的編輯器打開這個工程文件
ui

2.找到下面的字符串
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">.
而後用下面的字符串來替換
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">. (III)
spa

就這樣了
如今你就能夠在VS2008中打開了,反正也能夠經過反着改一下就能夠讓VS2008的項目在VS2010中打開了orm

三.作完這些改變後,可能會出現這樣的錯誤xml

-------------------------------------------------------------------
Microsoft Visual Studio
---------------------------
Unable to read the project file 'XXX.csproj'.

C:\Project path\XXX.csproj(89,11): The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
---------------------------
OK Cancel
------------------------------------------------------------------
爲了修正這個錯誤,只要的工程名.csproj/vbproj文件中找到上面的字符串,把v10.0改爲v9.0.就行了字符串

相關文章
相關標籤/搜索