简体   繁体   中英

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

I really really miss Object Test Bench 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 eg (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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM