How to bulk update Target Framework of Project
- My solution have 30 project's used .net 3.5, now I need to update all project's to .net 4.0. My question is how to bulk update Target Framework from 3.5 to 4.0 of all project's?
Eagle
Answers
Hello Eagle,
All C# and VB.NET project files (.csproj, .vbproj) are text based and can be understood by msbuild.exe. If you open these .csproj files in notepad.exe, you can find there is a element in it which specifies the .NET Target Framework.
--------------------------------------------------------------------------------------------------------------
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
--------------------------------------------------------------------------------------------------------------
You can write some Console application to find that elements in your 30 project files and change them to target .NET 4.0http://msdn.microsoft.com/en-us/library/bb383796.aspx
Ji ZhouMSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Marked As Answer byJi.ZhouMSFT, ModeratorTuesday, November 10, 2009 2:14 AM
All Replies
Hello Eagle,
All C# and VB.NET project files (.csproj, .vbproj) are text based and can be understood by msbuild.exe. If you open these .csproj files in notepad.exe, you can find there is a element in it which specifies the .NET Target Framework.
--------------------------------------------------------------------------------------------------------------
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
--------------------------------------------------------------------------------------------------------------
You can write some Console application to find that elements in your 30 project files and change them to target .NET 4.0http://msdn.microsoft.com/en-us/library/bb383796.aspx
Ji ZhouMSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Marked As Answer byJi.ZhouMSFT, ModeratorTuesday, November 10, 2009 2:14 AM
Does my last reply address your concern? If you need any future help, just let me know!
Have a nice day!Ji Zhou
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Thank your first. I have write code to handle it.
Eagle


