views:

136

answers:

3

Is it possible to bulk upgrade (many at the same time) VS 2005 projects to VS 2008.

I know that I can open one at a time, however, I would like to select say 10 at a time to upgrade and add to a new solution.

+1  A: 

There is no automatic tool that I know of (unless some commercial solution has been developed recently). But if you have a large number of projects to convert (100s) then it would probably be worth your while to write a small program to do this for you (we are programmers, after all :)). The project files are valid XML files. Just convert one or two manually, and note the differences/changes made in the project files. It doesn't change all that much when you upgrade from 2005 to 2008. Writing a program to make the same changes to a huge group of project files wouldn't be too hard.

sliderhouserules
+1  A: 

I always use the free AutoHotkey to perform repetitive tasks.

If you record your mouse/keyboard actions using one project you can then re-run those actions for a set of projects.

You can edit the macro manually if some projects require any different options.

demoncodemonkey
+1  A: 

I recently came across the same problem and used a Windows Powershell script to get Visual Studio to do the upgrading for me using the /upgrade command line switch

$slnFiles = ls C:\source -Filter *.sln -Recurse 
$devenv = "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe"
$i = 1
foreach ($sln in $slnFiles)
{
    "Upgrading Solution " + $i++ + ": " + $sln.FullName
    &$devenv /upgrade $sln.FullName
}
"Done!"
Casey