views:

357

answers:

4

I've been tasked with maintaining a Visual Studio 2005 solution but I only have access to Visual Studio 2008. Whenever I try to open the old solution in Visual Studio 2008 then the IDE is keen on converting the solution to the new version.

What exactly happens during this conversion and is there a way to stop it (since I need to deliver the code so that it can be opened in 2005)?

A: 

First of all, only the project file is changed as far as I know. In the cases I've encountered so far, basically only the version number is changed and the target framework is inserted. You can convert the project file back easily by just changing the version back.

Run the conversion and compare the project files (which are XML text files) with a diff tool, you'll see the differences right away.

Lucero
+6  A: 

This is the start of the 2005 solution file:

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005

and this is 2008:

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

Other than that you shouldn't have to change anything (well it worked that way in our case).

Igor Brejc
+3  A: 

My suggestion is that you should make a backup of the project first, then you should run the migration wizard of VS 2008. When it asks you if you want to see a report of all the files changed during migration, select Yes. It will display a list of files that were changed during the process.

In almost all cases, files changed are limited to the Project files in which the version number is changed. However, there is no hard and fast rule that nothing else will be changed and you should not be relying on this. The best way, IMHO, is to check the changes in each file that is mentioned in the Changed list.

If the only files changed were the project files, you should be easily able to maintain the code in VS 2008. Just change back the version in the project files when you need to redeploy.

Cerebrus
+1  A: 

Jon Skeet made a post about making VS2008 solutions coexist with VS2005.

The solution file will have a minor difference in version numbers as @Igor Brejc described. However there are also some changes made to the project files. Those changes are described at this article where there also is a nifty VS2005-VS2008 converter application available:

+==========================+====================+==========================+
| Element                  | VS2005             | VS2008                   |
+==========================+====================+==========================+
| Tools Version            | absent             | 3.5                      |
+--------------------------+--------------------+--------------------------+
| Product Version          | 8.0.50727          | 9.0.21022                |
+--------------------------+--------------------+--------------------------+
| Old Tools Version        | absent             | 2.0 (if converted)       |
+--------------------------+--------------------+--------------------------+
| Target Framework Version | absent             | 2.0                      |
+--------------------------+--------------------+--------------------------+
| Bootstrapper             | .NET Framework 2.0 | .NET Framework 2.0 (x86) |
+--------------------------+--------------------+--------------------------+
| Import Project           | $(MSBuildBinPath)  | $(MSBuildToolsPath)      |
+--------------------------+--------------------+--------------------------+

The application in the above link will convert both solution and project files in a VS2008 solution to VS2005 and vice versa.

Spoike

related questions