Tuesday, April 18, 2006

MSH Upgrade all CSProj files in a directory

I am currently working on our .NET 1.1 to .NET 2.0 conversion project at Vertafore.  After recently listening to the Hanselminutes on Msh I figured I would give it a spin.

One of the items we needed to do was run the command line upgrade across all of our projects.  At last count we had around 400 so this was a tall order.

Turns out it was only 5 lines of MSH!

Here it is for anyone else that wants it:

$devenv = "C:\program files\Microsoft Visual Studio 8\Common7\IDE\devenv.com"

foreach ($project in get-childitem -include *.csproj -recurse) {

   write-host "Upgrading Project: " $project

   & $devenv $project /Upgrade

}

Tuesday, April 18, 2006 4:20:53 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]   MSH
 

Comments are closed.

Administration
Sign In