Possible Duplicate:
Change the Target Framework for all my projects in a Visual Studio Solution
I have a just converted a Visual Studio project from 2005 to 2008 to take advantage of the .NET 3.5 Framework features. My solution contains approximately 80 projects and I want to set the Target Framework to .NET Framework 3.5 for all of them. Is there a way I can do this without manually going in and changing them one-by-one in Properties -> Application -> Target Framework?
You would need to edit all the .csproj files and change the line:
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
You could write a program that would scan your projects folders for all .csproj files, read them as text (or perhaps xml), update that line and then write them out again.
You might have an issue though if they're not already VS 2008 projects. So convert them first. And as you're doing that it'll probably be just as quick (if not quicker) to update the target framework version by hand.
Having said that, why not leave it alone until you make code changes the project anyway. As your code works now, and the only reason you want to update is to make use of the new features you're going to have to edit the project anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With