The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
Перейти к файлу
Jan Krivanek f9c08e5028
Merge branch 'vs17.7' into merge/vs17.6-to-vs17.7
2023-06-20 14:54:25 +02:00
.github Add needs-triage to feature requests (#8624) 2023-04-04 10:00:18 +08:00
.vscode Add VS Code tasks.json (#7036) 2021-11-15 14:07:24 -08:00
branding Initial commit of branding (#941) 2016-08-24 08:51:47 -07:00
documentation Term cleanup (#8799) 2023-05-25 16:07:53 +00:00
eng Merge branch 'vs17.6' into JanKrivanek-patch-6 2023-06-20 09:30:58 +02:00
newc Detect .NET SDK & VSLANG Custom Language Settings & Apply To MSBuild (#8503) 2023-05-12 10:58:37 +08:00
scripts Target net7.0 (#7790) 2022-09-19 13:22:56 -05:00
src Link roslyn 2023-06-20 13:31:21 +02:00
.editorconfig Fix build 2023-06-20 07:47:17 +02:00
.gitattributes Switch eng/common to linguist-vendored (#6022) 2021-01-12 16:35:11 -06:00
.gitignore Convert LiveLogger tests to use Verify 2023-05-15 15:24:01 -05:00
.opt-prof.yml Update .opt-prof.yml for Azure Pipelines (#8426) 2023-02-09 07:47:28 -08:00
.vsconfig Update .vsconfig to remove .NET Core 2.1 component (#8256) 2023-01-04 10:32:07 +08:00
.vsts-dotnet-ci.yml Run release job on preview VS 2023-05-23 11:05:30 -05:00
.vsts-dotnet.yml Merge branch 'vs17.7' into merge/vs17.6-to-vs17.7 2023-06-20 14:54:25 +02:00
Directory.Build.props Use NetCurrent to pull target .NET version from Arcade (#8865) 2023-06-16 09:41:18 -05:00
Directory.Build.rsp Add Directory.Build.rsp 2018-01-25 10:27:57 -08:00
Directory.Build.targets Revert accidental future-looking main change 2023-01-30 15:53:10 -06:00
LICENSE [master] Update dependencies from dotnet/arcade (#4251) 2019-03-20 21:45:47 +00:00
MSBuild.Dev.slnf Replace MSBuild.Dev.sln and MSBuild.SourceBuild.sln with solution filters (#6010) 2021-01-08 11:44:02 +01: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 Add testenvironments.json to solution items 2023-01-04 12:08:40 +01:00
NuGet.config [main] Update dependencies from dotnet/arcade (#6843) 2021-09-16 13:25:18 +02:00
README.md Remove the obsolete build status info 2023-01-04 17:03:58 +01: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 arcade 2023-06-20 13:01:23 +02:00
testenvironments.json Add testenvironments.json to solution items 2023-01-04 12:08:40 +01:00

README.md

Microsoft.Build (MSBuild)

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 docs.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
  1. Ensure long path support is enabled at the Windows level.
  2. Open a Developer Command Prompt for VS 2022 prompt.
  3. Clone the source code: git clone https://github.com/dotnet/msbuild
  1. 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.
  2. 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.