剛進新公司一周,而新公司的項目是在VS2008的環境中開發的。
但是,已經習慣了VS2010的各種擴展給我帶來的便利。
於是,自主的轉換成了Vs2010打開的項目。
然后,又將源碼提交到團隊管理中了。
所以,那些用VS2008開發的孩子們,就悲催了。
不過方法來了:
首先:查看一下該項目的.SLN文件並用記事本打開,
VS2008 為
Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008
VS2010為
Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010
於是,根據對比,聰明的我們就知道怎么修改了;
然后,還需要查看一下.CSPROJ文件:
VS2008為
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
VS2010為
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
於是,我們又發現他們當中的“ToolsVersion”的不同。那么我們進行相應的修改就OK了。
最后,我們就可以雙擊打開我們要開發的項目了。
終極省力
一園友在Codeproject上發現了一個解決該問題的寶貝“Visual Studio版本轉換工具”。
作者是:CodeBureau - Matt Simner,原地址是:SolutionConverter
參考文章:
http://www.cnblogs.com/zhuqil/archive/2010/05/31/SolutionConverter.html
http://www.cnblogs.com/boyliupan/archive/2010/06/22/1762726.html