What's New in MSBuild 4.0
The following features are new in MSBuild with the .NET Framework version 4:
The MSBuild 4.0 object model is completely extensible. For more information, see these three namespaces:
You can use the new property functions to read the system time, compare strings, match regular expressions, and perform other actions in your build script. For more information, see Property Functions.
You can now create tasks inline in the project file. You do not have to create a separate assembly to host the task. This makes it easier to keep track of source code and easier to deploy the task. For more information, see MSBuild Inline Tasks.
You can use the new BeforeTargets and AfterTargets target attributes to better control the build order. For more information, see MSBuild Targets.
You can compile an application to run on any one of several versions of the .NET Framework. For example, you can compile an application to run on the .NET Framework version 2.0, and compile the same application to run on the .NET Framework version 4. For more information, see MSBuild Multitargeting.
Visual C++ projects can now use MSBuild scripts, with support for native builds.
Platforms are now extensible. Third parties, such as XBox, can drop new platforms into Visual Studio.
Projects can define item functions. These functions simplify getting Distinct() items and are faster than looping through the items.