开发者

Is there a trick, tool, script to convert Visual Studio 2010 solution to 2008?

I really really miss Object Test B开发者_JAVA百科ench in VS 2008 What's the equivalent of Visual Studio 2008 Object Test Bench in Visual Studio 2010?

so I'd like to be able to convert or maintain both solution versions in VS2010 and VS2008. Any tips to do so quickly or something maintainable (I mean without duplicating .cs files but only .sln) as I'm continuously adding classes in VS 2010 ?


At your OWN RISK (you do have a recent backup of your code or a source-control system, right??) - you can try this:

  • open up your solution file (*.sln) in Notepad or your favorite editor

  • change the first line from:

    Microsoft Visual Studio Solution File, Format Version 11.00
    

    to

    Microsoft Visual Studio Solution File, Format Version 10.00
    
  • save that modified file as e.g. (yoursolution)_VS2008.sln

  • try and see if you can open the solution in VS 2008 again.

Between VS 2005 and 2008, only that one line in the SLN file changed - the project files (*.csproj, *.vbproj etc.) weren't touched. I haven't checked if that's still the case with VS2010 and VS2008.


I remember I converted VS 2008 solution to VS 2005 by just changing version in sln file (it is text file actually). try the same.


Unless your project is really, really big with complex settings, the surest most effective way is to just start a new 2008 project, and add your source-files to it.

It should only be 5 or 10 minutes of work, and you'd know for sure you had a proper 2008 project, instead of risking the problems that come with conversion.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜