With MSBuild, you can compile an application to run on any of several versions of the .NET Framework, as well as on any of several system platforms. For example, you can compile an application to run in the .NET Framework 2.0 on a 32-bit platform, and compile the same application to run in the .NET Framework 4.5 on a 64-bit platform.

Target runtime environment and target platform

The target runtime environment is the version of the .NET Framework platform that the project is designed to run on, and the target platform is the system platform for which the project is designed. For example, a .NET Framework 2.0 application can be configured to run on a 32-bit platform that is compatible with the 80×86 (x86) processor family. The combination of the required version of the .NET Framework and the target platform is called the target context.

ToolsVersion

The toolset includes the tools, tasks, and target objects used to create an application. The toolset includes compilers such as csc.exe and vbc.exe, a common build targets file (microsoft.common.targets), and a common tasks file (microsoft.common.tasks). Toolkit 4.5 can be used for .NET Framework versions 2.0, 3.0, 3.5, 4, and 4.5. However, the 2.0 toolkit can only be used for .NET Framework version 2.0.

Reference assemblies

Reference assemblies defined in the toolkit allow you to design and build applications. These reference assemblies not only allow you to create a specific target assembly, but also limit the set of components and functions in the Visual Studio IDE to those that are compatible with the target object.

Customizing target platforms and tasks

MSBuild target objects and tasks can be customized to execute outside of the process using MSBuild so that you can define target contexts that are significantly different from the one in which the execution is taking place. For example, on a computer with a 64-bit platform and .NET Framework 4.5, you can create a .NET Framework 2.0 application designed for a 32-bit platform.