Skip to content

Commit 10ca81e

Browse files
committed
MSBuild reference links
1 parent 8a5fa34 commit 10ca81e

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

docs/msbuild/find-and-use-msbuild-versions.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ If you redistribute *Microsoft.Build.Locator.dll* with your application, you won
2323

2424
Using the locator API requires a few changes in your project, described below. To see an example of the changes required to update a project, see [the commits made to an example project in the MSBuildLocator repository](https://github.com/Microsoft/MSBuildLocator/commits/example-updating-to-msbuild-15).
2525

26-
### Change MSBuild references
26+
## Change MSBuild references
2727

2828
To make sure that MSBuild loads from a central location, you must not distribute its assemblies with your application.
2929

3030
The mechanism for changing your project to avoid loading MSBuild from a central location depends on how you reference MSBuild.
3131

32-
#### Use NuGet packages (preferred)
32+
### Use NuGet packages (preferred)
3333

3434
These instructions assume that you're using [PackageReference-style NuGet references](/nuget/consume-packages/package-references-in-project-files).
3535

@@ -59,11 +59,11 @@ If you can't use NuGet packages, you can reference MSBuild assemblies that are d
5959
> [!NOTE]
6060
> If you're updating from a version of MSBuild prior to 15, MSBuild requires binding redirects for certain assemblies (Microsoft.Build assemblies), but if you reference the Microsoft.Build.Locator package, you ensure that your application automatically uses the required binding redirects to version 15.1.0.0. Binding redirects to this version support MSBuild 15.x, 16.x, and 17.x.
6161
62-
### Ensure output is clean
62+
## Ensure output is clean
6363

6464
Build your project and inspect the output directory to make sure that it doesn't contain any *Microsoft.Build.\*.dll* assemblies other than *Microsoft.Build.Locator.dll*, added in the next step.
6565

66-
### Add package reference for Microsoft.Build.Locator
66+
## Add package reference for Microsoft.Build.Locator
6767

6868
Add a NuGet package reference for [Microsoft.Build.Locator](https://www.nuget.org/packages/Microsoft.Build.Locator/).
6969

@@ -75,7 +75,7 @@ Add a NuGet package reference for [Microsoft.Build.Locator](https://www.nuget.or
7575

7676
Do not specify `ExcludeAssets=runtime` for the Microsoft.Build.Locator package.
7777

78-
### Register instance before calling MSBuild
78+
## Register instance before calling MSBuild
7979

8080
When you're creating a build application for general use, you don't know what versions of Visual Studio, .NET, and MSBuild might be installed on a machine your application is being executed on. The purpose of MSBuildLocator is to find an appropriate installation of MSBuild to use on machines with diverse installation environments. MSBuildLocator allows you to specify some logic to determine which MSBuild to use, but you as the developer of your application need to determine what MSBuild version it requires or can accept, or else provide a way for your users to specify a version, and include logic to translate that choice into appropriate calls to the MSBuildLocator API.
8181

@@ -115,3 +115,14 @@ You cannot reference any MSBuild types (from the `Microsoft.Build` namespace) in
115115
```
116116

117117
To specify an MSBuild instance, you can select a result of `MSBuildLocator.QueryVisualStudioInstances` to pass to `MSBuildLocator.RegisterInstance` using the custom logic you need.
118+
119+
## Next steps
120+
121+
Learn about MSBuild APIs by consulting the MSBuild API Reference:
122+
123+
- [Microsoft.Build.Evaluation](/dotnet/api/microsoft.build.evaluation)
124+
- [Microsoft.Build.Execution](/dotnet/api/microsoft.build.execution)
125+
- [Microsoft.Build.Framework](/dotnet/api/microsoft.build.framework)
126+
- [Microsoft.Build.Logging](/dotnet/api/microsoft.build.logging)
127+
- [Microsoft.Build.Tasks](/dotnet/api/microsoft.build.tasks)
128+
- [Microsoft.Build.Utilities](/dotnet/api/microsoft.build.utilities)

0 commit comments

Comments
 (0)