.net.net-4.0projects-and-solutionsproject-conversion

Changing to new Framework


I have a solution with many, many projects. How do I change the target framework to .NET 4.0 without going to each one individually and manually changing the dropdown?


Solution

  • Try comparing a 3.5 project file and a 4.0 project file and use a file based search/replace operation.

    I think only these two version numbers differ:

    <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>