MSBuild

From Wikipedia, the free encyclopedia

Jump to: navigation, search

MSBuild is a Microsoft build platform typically used in conjunction with Visual Studio. MSBuild version 2.0 is part of .NET Framework 2.0 and works together with Visual Studio 2005. Version 3.5 of MSBuild, which is bundled together with .NET 3.5 (and Visual Studio 2008), allows .NET projects to be built for either 2.0, 3.0 or 3.5 .NET version support (so called "multi-targeting").

Since MSBuild is available as part of .NET, it is possible to build Visual Studio projects and solutions without the Visual Studio IDE installed. MSBuild is available at no cost.

MSBuild acts on MSBuild project files which have a similar XML syntax to Apache Ant or NAnt. Even though the syntax is based upon well-defined XML schema, the fundamental structure and operation is comparable to the traditional Unix make utility: the user specifies what will be used (typically source code files) and what the result should be (typically an application), but the utility itself decides what to do and the order in which to do it.

Contents

[edit] BSCMAKE

MSBuild is a functional replacement for the BSCMAKE utility, the latter of which remains in use in projects that originated in older Visual Studio releases.

[edit] Target

The focus of the tool is the result Target specified when invoking MSBuild with the project file. Subsequent dependent Targets are executed before the requested Target. Each Target may be self contained with the necessary Tasks to complete itself. A Target is typically an action executed on a file, set of files or directory.

[edit] Task

A Task is a command which is executed in order to complete a Target. A Task is typically implemented in a .NET assembly as a class which inherits from the Task class or implements the ITask interface. Great many ready-to-use Tasks exist, with basic tasks being shipped as part of .NET Framework, and community developed tasks freely available.

[edit] Properties and Items

In addition the MSBuild provides Properties and Items, which are conceptually equivalent to make's macros. Properties specify static values, whereas Items are usually used to define set of files/folder to perform Tasks upon. Specifying files on Items is made easy by the support of wildcards.

[edit] Team Foundation Build

The Visual Studio Team System also depends on MSBuild to perform the actual Team Builds via the Visual Studio Team Foundation Server. The builds are most likely not executed on the server itself, but remotely on one or more Build Servers with the necessary software installed (i.e. Team Foundation Server (Build)).

[edit] References

[edit] External links

Personal tools
Languages