Search code examples
.netvisual-studio-2010visual-studio-2008projects-and-solutions

Creating a VS2010 Solution File for a VS2008 Solution


Is it possible to create a VS2010 solution file for an already existing VS2008 solution? So I would have both a VS2008 and a VS2010 solution file and be able to open the solution from either VS2008 or VS2010 without the project converter running?

Could I copy the 2008 .sln, rename it to MyProject2010.sln and replace:

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008

with

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010 

Is there anything else that I would need to change or create other than the solution file?

Thanks in advance


Solution

  • First, Take a backup copy from your project ;)

    Yes. Modifying solution file as you said in your question works perfect! But every time you want to open in another version of visual studio, you have to do this change in solution file.

    This means if you opened the solution in visual studio 2010, and now you want to open it in visual studio 2008, you should modify those two lines and then visual studio 2008 will open it! also if you want to open a visual studio 2008 solution in visual studio 2010, you should modify those two lines.

    Note: first time, visual studio 2010 may show convert wizard. simply click on "Finish" button.

    And remember, do not change .Net Framework target version to 4.0 (or higher!)

    I have tried these right now and it worked. ( I modified solution file using Notepad++ )