HOME

TheInfoList



OR:

Microsoft Build Engine, or MSBuild, is a set of
free and open-source Free and open-source software (FOSS) is a term used to refer to groups of software consisting of both free software and open-source software where anyone is freely licensed to use, copy, study, and change the software in any way, and the source ...
build tools for
managed code Managed code is computer program code that requires and will execute only under the management of a Common Language Infrastructure (CLI); Virtual Execution System (VES); virtual machine, e.g. .NET, CoreFX, or .NET Framework; Common Language Runt ...
under the
Common Language Infrastructure The Common Language Infrastructure (CLI) is an open specification and technical standard originally developed by Microsoft and standardized by ISO/IEC (ISO/IEC 23271) and Ecma International (ECMA 335) that describes executable code and a runt ...
as well as native C and
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
code. It was first released in 2003 and was a part of
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
. MSBuild is included with
Visual Studio Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including web site, websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platfor ...
, but can also be run independently through MSBuild's
command-line interface A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
.


Overview

MSBuild is a build tool that helps automate the process of creating a software product, including
compiling In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
the
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
,
packaging Packaging is the science, art and technology of enclosing or protecting products for distribution, storage, sale, and use. Packaging also refers to the process of designing, evaluating, and producing packages. Packaging can be described as a co ...
, testing,
deployment Deployment may refer to: Engineering and software Concepts * Blue-green deployment, a method of installing changes to a web, app, or database server by swapping alternating production and staging servers * Continuous deployment, a software en ...
and creating documentations. With MSBuild, it is possible to build Visual Studio projects and solutions without the Visual Studio IDE installed. MSBuild is
free and open-source Free and open-source software (FOSS) is a term used to refer to groups of software consisting of both free software and open-source software where anyone is freely licensed to use, copy, study, and change the software in any way, and the source ...
. MSBuild was previously bundled with
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
; starting with
Visual Studio 2013 Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including web site, websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platfor ...
, however, it is bundled with Visual Studio instead. MSBuild is a functional replacement for the
nmake In software development, Make is a build automation tool that automatically builds executable programs and libraries from source code by reading files called ''Makefiles'' which specify how to derive the target program. Though integrated devel ...
utility, which remains in use in projects that originated in older Visual Studio releases. MSBuild acts on MSBuild project files which have a similar
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
syntax to
Apache Ant Apache Ant is a software tool for automating software build processes which originated from the Apache Tomcat project in early 2000 as a replacement for the Make build tool of Unix. It is similar to Make, but is implemented using the Java languag ...
or NAnt. Even though the syntax is based upon well-defined
XML schema An XML schema is a description of a type of Extensible Markup Language, XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed ...
, the fundamental structure and operation is comparable to the traditional Unix
make Make or MAKE may refer to: * Make (magazine), a tech DIY periodical *Make (software), a software build tool *Make, Botswana, in the Kalahari Desert *Make Architects Make Architects is an international architecture practice headquartered in Londo ...
utility: the user specifies what will be used (typically source code files) and what the result should be (typically a static library, DLL or an executable application), but the utility itself decides what to do and the order in which to carry out the build. MSBuild can build a project against a supported .NET Framework version of choice. This feature is called "multitargeting". Any given build of a project, however, can only target one version of the framework at a time.


History

MSBuild was first created in 2003 targeting
.NET Framework 2.0 Microsoft started development on the .NET Framework in the late 1990s originally under the name of Next Generation Windows Services (NGWS). By late 2001 the first beta versions of .NET 1.0 were released. The first version of .NET Framework was ...
for use in
Visual Studio 2005 Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platforms such ...
(codenamed Whidbey) and
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
(codenamed Longhorn).


Versions


Terminology

;Target: A ''Target'' contains a set of tasks for MSBuild to execute. The focus of MSBuild is the result ''Target'' specified when invoking MSBuild with the project file. This is because a ''Project'' may contain several ''Target'' entries, each executed sequentially (and conditionally). Subsequent dependent Targets are executed before the requested Target. The execution flow of the current ''Target'' can be directed using the following attributes: Condition, BeforeTargets, AfterTargets, & DependsOnTargets. 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. ;Task: A ''Task'' is a command which is executed in order to complete a Target. ''Tasks'' are used to group and execute any number of actions during the build process. They are typically implemented in a .NET assembly as a class which inherits from the Task class or implements the ITask interface. Many basic tasks are shipped as part of the .NET Framework, and community developed tasks are freely available. Some examples of ''Tasks'' include copying files, creating directories, or parsing XML. ;Properties and Items: MSBuild provides ''Properties'' and ''Items'', which are conceptually equivalent to make's macros. Properties specify static values, whereas Items are usually used to define sets of files or folders on which to perform Tasks. Specifying files on Items is made easy by the support of wildcards.


See also

*
List of build automation software Build automation involves scripting or automating the process of compiling computer source code into binary code. Below is a list of notable tools associated with automating build processes. Make-based * GNU make, a make implementation with a ...


References


Further reading

* * * * * * *


External links

* {{Microsoft FOSS Build automation Compiling tools Free and open-source software Microsoft free software Microsoft Visual Studio Software using the MIT license 2003 software