Can I use MSBuild 4.0 for MSBuild 2.0 XML Files and a mix of VS2010 (.NET 4.0) and VS2005 (.NET 2.0) projects?

StackOverflow https://stackoverflow.com/questions/10949704

سؤال

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?

هل كانت مفيدة؟

المحلول

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)
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top