The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
Перейти к файлу
dotnet bot 1079f2ce7d
Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 10438954 (#10870)
2024-10-23 17:35:23 +02:00
.config add policheck baseline (#10779) 2024-10-09 16:26:30 +02:00
.github Update source-build team references (#10830) 2024-10-19 10:31:27 +02:00
.vscode Add VS Code tasks.json (#7036) 2021-11-15 14:07:24 -08:00
branding update msbuild logo (#10699) 2024-09-25 09:51:59 +02:00
documentation Update BuildCheck-Architecture.md (#10867) 2024-10-23 13:52:18 +00:00
eng Update dependencies from https://github.com/dotnet/roslyn build 20241022.11 (#10865) 2024-10-23 15:21:40 +00:00
scripts Retargeting to .NET 9 (#10484) 2024-08-28 08:25:47 +02:00
src Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 10438954 (#10870) 2024-10-23 17:35:23 +02:00
template_feed Expose API for imported projects checks (#10761) 2024-10-19 10:32:33 +02:00
.editorconfig xUnit2013 Justifications (#10663) 2024-09-16 21:53:59 +02:00
.exp-insertions.yml Handle access to vssps for PerfStar (#10366) 2024-07-15 09:31:20 +00:00
.git-blame-ignore-revs Add .git-blame-ignore-revs 2023-11-06 11:11:39 -06:00
.gitattributes Update .gitattributes (#10335) 2024-07-08 17:34:17 +02:00
.gitignore Convert LiveLogger tests to use Verify 2023-05-15 15:24:01 -05:00
.opt-prof.yml update from Windows-10-Enterprise-20H2 to Windows-11-Enterprise-23H2 2024-04-30 15:29:21 +02:00
.vsconfig Remove stale .vsconfig components (#8862) 2023-10-10 16:17:35 +02:00
.vsts-dotnet-ci.yml [automated] Merge branch 'vs17.11' => 'main' (#10279) 2024-07-08 16:16:38 +00:00
.vsts-dotnet.yml Pass PoliCheck exclusion file to 1ES PT (#10797) 2024-10-14 10:44:42 +08:00
Directory.Build.props Move to new VMR control set (#10661) 2024-09-16 10:18:26 -07:00
Directory.Build.rsp Add Directory.Build.rsp 2018-01-25 10:27:57 -08:00
Directory.Build.targets Preload System.Text.Json 8.0.0.4 2024-09-11 11:43:50 -05:00
LICENSE [master] Update dependencies from dotnet/arcade (#4251) 2019-03-20 21:45:47 +00:00
MSBuild.Dev.slnf Fix bug: No visible message when replaying analyzed build (#10265) 2024-06-20 12:28:24 +00:00
MSBuild.SourceBuild.slnf Add StringTools* projects to solution files 2021-01-20 22:34:05 +01:00
MSBuild.lutconfig Enable Live Unit Testing (#7577) 2022-04-27 11:40:54 -07:00
MSBuild.sln pack template for custom analyzer (#10155) 2024-05-27 14:24:46 +08:00
NuGet.config Update dependencies from https://github.com/dotnet/roslyn build 20241022.11 (#10865) 2024-10-23 15:21:40 +00:00
README.md Add build status badged public and internal (#10275) 2024-06-21 09:16:09 +02:00
THIRDPARTYNOTICES.txt Update third party notice to include Samples for xUnit.net notice 2018-01-31 18:06:44 -08:00
build.cmd Discourage building with MSBUILDDEBUGONSTART (#4952) 2019-12-10 14:46:41 -08:00
build.sh Use env for bash path (#8716) 2023-05-01 13:31:08 -07:00
global.json Update dependencies from https://github.com/dotnet/arcade build 20241016.2 (#10831) 2024-10-17 07:25:56 +00:00
testenvironments.json Add testenvironments.json to solution items 2023-01-04 12:08:40 +01:00

README.md

Microsoft.Build (MSBuild)

Build Status Build Status

The Microsoft Build Engine is a platform for building applications. This engine, also known as MSBuild, provides an XML schema for a project file that controls how the build platform processes and builds software. Visual Studio uses MSBuild, but MSBuild can run without Visual Studio. By invoking msbuild.exe on your project or solution file, you can orchestrate and build products in environments where Visual Studio isn't installed.

For more information on MSBuild, see the MSBuild documentation on learn.microsoft.com.

The changelog has detailed information about changes made in different releases.

Building

Building MSBuild with Visual Studio 2022 on Windows

For the full supported experience, you will need to have Visual Studio 2022 or higher.

To get started on Visual Studio 2022:

  1. Install Visual Studio 2022. Select the following Workloads:
    • .NET desktop development
    • .NET Core cross-platform development
  2. Ensure long path support is enabled at the Windows level.
  3. Open a Developer Command Prompt for VS 2022 prompt.
  4. Clone the source code: git clone https://github.com/dotnet/msbuild
  5. Run .\build.cmd from the root of the repo to build the code. This also restores packages needed to open the projects in Visual Studio.
  6. Open MSBuild.sln or MSBuild.Dev.slnf in Visual Studio 2022.

This newly-built MSBuild will be located at artifacts\bin\bootstrap\net472\MSBuild\Current\Bin\MSBuild.exe. It may not work for all scenarios, including C++ builds.

Building MSBuild in Unix (Mac & Linux)

MSBuild can be run on Unix systems that support .NET Core. Set-up instructions can be viewed on the wiki: Building Testing and Debugging on .Net Core MSBuild

Localization

You can turn on localized builds via the /p:LocalizedBuild=true command line argument. For more information on localized builds and how to make contributions to MSBuild's translations, see our localization documentation

Interested in contributing?

Before you contribute, please read through the contributing and developer guides to get an idea of what kinds of pull requests we accept.

Other ways to contribute

We encourage any contributions you decide to make to the repo!

MSBuild Components

  • MSBuild. Microsoft.Build.CommandLine is the entrypoint for the Microsoft Build Engine (MSBuild.exe).

  • Microsoft.Build. The Microsoft.Build namespaces contain types that provide programmatic access to, and control of, the MSBuild engine.

  • Microsoft.Build.Framework. The Microsoft.Build.Framework namespace contains the types that define how tasks and loggers interact with the MSBuild engine. For additional information on this component, see our Microsoft.Build.Framework wiki page.

  • Microsoft.Build.Tasks. The Microsoft.Build.Tasks namespace contains the implementation of all tasks shipping with MSBuild.

  • Microsoft.Build.Utilities. The Microsoft.Build.Utilities namespace provides helper classes that you can use to create your own MSBuild loggers and tasks.

License

MSBuild is licensed under the MIT license.