Tuesday, September 27, 2011

Change the Target Framework for all Projects in a Solution

There is a great Visual Studio macro written by Scott Dorman that can be used to automate the changing of the target framework of all projects in a visual studio solution: Visual Studio 2010 and Target Framework Version. The macro is available on Scotts Sky Drive: ProjectUtilities.vb. Download it to \Documents\Visual Studio 2010\Projects\VSMacros80\MyMacros. Then open the the Macro IDE (Alt+F11), add the downloaded .vb file to MyMacros and run it. The solution must be opened in Visual Studio when you run this macro of course. The macro works well with 4.0 as target version (haven't tested it with other framework versions yet). Have fun!