Visual Studio 2008 to 2005 downgrade utility

Published 28 February 8 3:46 PM | HeroicLife
Visual Studio 2008 allows you to target .Net Framework 2.0, so you don't have to migrate the solutions you developed in Visual Studio 2005 to a new framework version.  The only problem is that it upgrades the solution and project files, making your solutions incompatible with Visual Studio 2005, which is a problem if you work on a team with Visual Studio 2005 users.

This utility allows you to downgrade your 2008 C# solutions and projects to 2005. 

  • If you point it to a solution file, it will locate and downgrade the projects in that solution.
  • Changing a few lines in the code will switch it to VB.Net projects. 
  • It only changes version numbers and build targets, so it will keep 2008 metadata, allowing the project to open in both versions. 
  • I only wrote enough code to allow my solutions to compile in 2005, so no guarantee that it will work in all cases.
VisualStudioProjectDowngrade.zip
Filed under:

Comments

# Dave Hearn said on April 7, 2008 4:55 AM:

When I tried this, it complained that it couldn't find the referenced project file path.  The issue was that the .sln file uses relative paths, and unless the downgrade app is run from where the .sln file is, it doesn't find the correct path.

My solution was to add the following line into btnSelectProjectFile_Click(), just after the creation of info, the FileInfo object:

Directory.SetCurrentDirectory(info.DirectoryName);

Once that was done, it worked perfectly - thanks.

# graye said on April 18, 2008 6:15 PM:

I've got a ProjectConveter utility that will convert solution files between VS2005 and VS2008: home.hot.rr.com/.../ProjectConverter.htm

# THANKS! said on April 20, 2008 2:15 PM:

THANKS JUST WHAT I WAS LOOKING FOR, I GOT VS08 BUT AT WORK I HAVE TO RUN IT AND THEY ONLY HAVE VS05.

Leave a Comment

Name:  
Website: