Question

I have a build script written for MSBuild 2.0 using .NET Framework 2.0.

Now I am migrating some of my projects to use .NET Framework 4.0. So I have a mix of .NET 2.0 (Visual Studio 2005) and .NET 4.0 (Visual Studio 2010) projects.

Can I use MSBuild 4.0 to compile all my projects or do I have to use MSBuild 4.0 and MSBuild 2.0? Are there any problems when using MSBuild 2.0 XML Files in MSBuild 4.0?

Was it helpful?

Solution

Yes, you can use MSBuild 4.0 to run MSBuild 2.0 scripts (or Visual Studio 2005 projects).

To test it out:

  1. Open the Visual Studio 2010 command prompt
  2. Change to the directory containing your solution or project files
  3. Run MSBuild (if run without any parameters, it'll build any solutions and/or project files in the current directory)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top