The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
Перейти к файлу
Jan Krivanek aeabd8b112
Add BuildCheck basic telemetry (#10652)
* Add initial version of telemetry data extracting

* Initial tracing data transport

* Move buildcheck enabled telemetry to buildtelemetry

* Add unittests

* Fix typos

* Add CheckFriendlyName to telemetry

* Add SAC telemetry

* Adjust after merging
2024-09-13 17:51:15 +02:00
.config Pass CredScanSuppressions.json to 1ES template (#10420) 2024-07-22 15:02:49 +02:00
.github Update the template file path since the template project changed (#10541) 2024-08-22 17:17:38 +08:00
.vscode Add VS Code tasks.json (#7036) 2021-11-15 14:07:24 -08:00
branding
documentation Fix mermaid markup (#10626) 2024-09-11 19:31:58 +02:00
eng Use RC1 SDK 2024-09-11 11:43:50 -05:00
scripts Retargeting to .NET 9 (#10484) 2024-08-28 08:25:47 +02:00
src Add BuildCheck basic telemetry (#10652) 2024-09-13 17:51:15 +02:00
template_feed Opt-in CPM for buildcheck template (#10607) 2024-09-11 08:55:54 +02:00
.editorconfig xunit1031 justification (#10641) 2024-09-13 13:16:29 +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 CredScanSuppressions.json to 1ES template (#10420) 2024-07-22 15:02:49 +02:00
Directory.Build.props Retargeting to .NET 9 (#10484) 2024-08-28 08:25:47 +02:00
Directory.Build.rsp
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 Retargeting to .NET 9 (#10484) 2024-08-28 08:25:47 +02:00
README.md Add build status badged public and internal (#10275) 2024-06-21 09:16:09 +02:00
THIRDPARTYNOTICES.txt
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 Merge pull request #10643 from dotnet/net9-rc1 2024-09-11 12:37:37 -05: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.