MSBuild provides a public API surface so that your program can perform builds and inspect projects. Recent versions of the MSBuild APIs can be found in the following NuGet packages:
Delivers a complete executable copy of MSBuild. Reference this package only if your application needs to load projects or execute in-process builds without requiring installation of MSBuild. Successfully evaluating projects using this package requires aggregating additional components (like the compilers) into an application directory.
Contains the Microsoft.Build.Utilities assembly which is used to implement custom MSBuild tasks.
In addition, NuGet also hosts a legacy assembly, Microsoft.Build.Engine, which is deprecated.
There are several different versions of the MSBuild API, and for versions 15 and 16, there are two distinct forms of the assemblies in the NuGet packages, one compiled with the .NET Framework, and another compiled with .NET Core, which is a subset of the .NET Framework API surface. The .NET Core version of MSBuild is used when you invoke the dotnet command, and when using MSBuild on Mac and Linux systems.
Documentation for the MSBuild API can be found by using the .NET API Browser, or by browsing the namespaces in the following list.
Contains types that the MSBuild object model uses to construct project roots with unevaluated values. Each project root corresponds to a project or targets file.
Contains helper classes that you can use to create your own MSBuild loggers and tasks.
In the previous table, All in the Applies To column means the types in the namespace are available in both the .NET Framework and the .NET Core versions of the MSBuild API.
.NET is a free, cross-platform, open source developer platform for building many different types of applications. With .NET, you can use multiple languages, editors, and libraries to build for web, mobile, desktop, games, and IoT.
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.