What's New in MSBuild 4.5

The following features are new in MSBuild with the .NET Framework 4.5.

  • You can specify that a task must run out-of-process. For example, a task may have to run with a different bit-ness or CLR version than the msbuild.exe process. Unless you write tasks, this improvement is invisible. For more information, see Configuring Targets and Tasks.

  • You can produce binaries that target an ARM (Advanced RISC Machine) processor.

  • Performance and scalability have been improved.

  • If you specify sub-toolsets, MSBuild can automatically determine which set of tools to use based on the context in which the build is being run. For more information, see MSBuild Tool Set (ToolsVersion).

  • By using the VisualStudioVersion common project property, you can specify the version of Visual Studio under which this project should be considered to be running. For more information, see Common MSBuild Project Properties.

  • The DoesTaskHostExist property function returns whether a task host is currently installed for the specified runtime and architecture values. The ValueOrDefault property function returns the first argument, unless it's null or empty. If the first argument is null or empty, the function returns the second argument. For more information, see Property Functions.

  • Project elements support the TreatAsLocalProperty attribute, which prevents specific command-line properties from overriding property values that are set in a project or targets file. For more information, see How to: Build the Same Source Files with Different Options.

  • Item elements support the following attributes. For more information, see MSBuild Items.

    • KeepMetadata specifies the metadata for the source items to add to the target items.

    • RemoveMetadata specifies the metadata for the source items to not transfer to the target items.

    • KeepDuplicates specifies whether an item should be added to the target group if it's an exact duplicate of an existing item.

  • The ContinueOnError attribute of a Task can now contain any of the following values: WarnAndContinue (or true), ErrorAndContinue, and ErrorAndStop (or false). Previously, this attribute could contain only true or false. For more information, see How to: Ignore Errors in Tasks.

Other Resources

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft