Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

MSBuild

From Wikipedia, the free encyclopedia
Build automation software
"Microsoft build" redirects here. For the conference, seeBUILD (Microsoft).
MSBuild
DevelopersMicrosoft,.NET Foundation
Initial release2003; 22 years ago (2003)
Stable release
v17.8.3 / 15 November 2023; 2 years ago (2023-11-15)[1]
Repository
Written inC#
Operating systemCross-platform
Platform.NET Framework,.NET
TypeBuild tool
LicenseMIT License
Websitedocs.microsoft.com/visualstudio/msbuild/msbuild Edit this on Wikidata

Microsoft Build Engine, orMSBuild,[2][3] is a set offree and open-sourcebuild tools formanaged code under theCommon Language Infrastructure as well as nativeC andC++ code. It was first released in 2003 and was a part of.NET Framework. MSBuild is included withVisual Studio, but can also be run independently through MSBuild'scommand-line interface.[4]

Overview

[edit]

MSBuild is abuild tool that helps automate the process of creating a software product, includingcompiling thesource code,packaging, testing,deployment and creating documentations. With MSBuild, it is possible to build Visual Studio projects and solutions without the Visual StudioIDE installed. MSBuild isfree and open-source.[5] MSBuild was previously bundled with.NET Framework; starting withVisual Studio 2013, however, it is bundled with Visual Studio instead.[6] MSBuild is a functional replacement for thenmake utility, which remains in use in projects that originated in older Visual Studio releases.

MSBuild acts on MSBuild project files which have a similarXML syntax toApache Ant orNAnt. Even though the syntax is based upon well-definedXML schema, the fundamental structure and operation is comparable to the traditional Unixmake 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.[7]

History

[edit]

MSBuild was first created in 2003 targeting.NET Framework 2.0 for use inVisual Studio 2005 (codenamed Whidbey)[8] andWindows Vista (codenamed Longhorn).[9][10]

Versions

[edit]
Version.NET FrameworkVisual Studio VersionUsual Install Locations (x86)[11]
2.02.02005C:\Windows\Microsoft.NET\Framework\v2.0.50727
3.53.52008C:\Windows\Microsoft.NET\Framework\v3.5
4.7.3062.04.02010C:\Windows\Microsoft.NET\Framework\v4.0.30319
4.8.3761.04.5.22012C:\Windows\Microsoft.NET\Framework\v4.0.30319
12.0[6]4.5.22013C:\Program Files (x86)\MSBuild\12.0\Bin
14.04.62015C:\Program Files (x86)\MSBuild\14.0\Bin
15.0[12]4.72017
  • C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin
  • C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin
  • C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
16.0[13]4.7.22019
  • C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin
  • C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin
  • C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin
17.02022
  • C:\Program Files\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin
  • C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin
  • C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin
  • C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin

Terminology

[edit]
This sectionmay beconfusing or unclear to readers. In particular, it is unclear what this section is talking about and what is the nature of, say, a "Target" or "Task". Examples would help. Please helpclarify the section. There might be a discussion about this onthe talk page.(April 2013) (Learn how and when to remove this message)
Target
ATarget contains a set of tasks for MSBuild to execute. The focus of MSBuild is the resultTarget specified when invoking MSBuild with the project file. This is because aProject may contain severalTarget entries, each executed sequentially (and conditionally). Subsequent dependent Targets are executed before the requested Target. The execution flow of the currentTarget 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
ATask 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,[14] and community developed tasks are freely available. Some examples ofTasks include copying files, creating directories, or parsing XML.
Properties and Items
MSBuild providesProperties andItems, which are conceptually equivalent tomake'smacros. 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

[edit]

References

[edit]
  1. ^"Latest release". Microsoft/msbuild.GitHub.Microsoft. Retrieved2022-08-20.
  2. ^"microsoft/msbuild: The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio".GitHub.Microsoft. Retrieved2019-07-23.
  3. ^Hashimi, Sayed Ibrahim; Bartholomew, William (2009).Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build. Microsoft Press. p. 406.ISBN 978-0-7356-2628-7.
  4. ^"MSBuild". MSBuild.Microsoft Docs. Retrieved2019-07-23.
  5. ^Lander, Rich (18 March 2015)."MSBuild Engine is now Open Source on GitHub". .NET Blog.MSDN Blogs.Microsoft. Retrieved2019-07-23.
  6. ^ab"What's new in MSBuild 12.0". MSBuild.Microsoft Docs. Retrieved2019-07-23.
  7. ^"MSBuild multitargeting overview". MSBuild.Microsoft Docs. Retrieved2019-07-23.
  8. ^"Building, Testing, and Deployment". What's New in Visual Studio 2005.MSDN. Microsoft. Archived fromthe original on 2014-08-26.
  9. ^Sneath, Tim (July 19, 2004)."MSBuild: The New Build System for Visual Studio 2005 and Longhorn". Tim Sneath.MSDN Blogs. Retrieved2018-04-22.
  10. ^England, Chuck (February 25, 2010)."Getting Started with MSBuild". The Visual Studio Blog.MSDN Blogs. Retrieved2018-04-22.
  11. ^"Standard and custom Toolset configurations". MSBuild.Microsoft Docs. Retrieved2019-07-23.
  12. ^"What's new in MSBuild 15". MSBuild.Microsoft Docs. Retrieved2019-07-23.
  13. ^"What's new in MSBuild 16.0". MSBuild.Microsoft Docs. Retrieved2019-07-23.
  14. ^"MSBuild task reference". MSBuild.Microsoft Docs. Retrieved2019-07-23.

Further reading

[edit]

External links

[edit]
Microsoft development tools
Development
environments
Visual Studio
Others
Languages
APIs and
frameworks
Native
.NET
Device drivers
Database
SQL Server
SQL services
Other
Source control
Testing and
debugging
Delivery
Overview
Software
Applications
Video games
Programming
languages
Frameworks,
development tools
Operating systems
Other
Licenses
Forges
Related
Retrieved from "https://en.wikipedia.org/w/index.php?title=MSBuild&oldid=1288400520"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp