Skip to content

Commit

Permalink
add new section to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
YuliiaKovalova committed Sep 15, 2023
1 parent 4c9c8d4 commit 63259a2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ That additional build logic is distributed with Visual Studio, with Visual Studi

Loading MSBuild from Visual Studio also ensures that your application gets the same view of projects as `MSBuild.exe`, `dotnet build`, or Visual Studio, including bug fixes, feature additions, and performance improvements that may come from a newer MSBuild release.

## How Locator searches for .NET SDK?

MSBuild.Locator searches for the locally installed SDK based on the following priority:

1. DOTNET_ROOT
2. Current process path if MSBuild.Locator is called from dotnet.exe
3. DOTNET_HOST_PATH
4. DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR
5. PATH

Note that probing stops when the first dotnet executable is found among the listed variables.

Documentation describing the definition of these variables can be found here: [.NET Environment Variables](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables).

## Documentation

Documentation is located on the official Microsoft documentation site: [Use Microsoft.Build.Locator](https://docs.microsoft.com/visualstudio/msbuild/updating-an-existing-application#use-microsoftbuildlocator).
Expand Down
1 change: 0 additions & 1 deletion src/MSBuildLocator/DotNetSdkLocationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ private static IntPtr HostFxrResolver(Assembly assembly, string libraryName)
return IntPtr.Zero;
}


private static string SdkResolutionExceptionMessage(string methodName) => $"Failed to find all versions of .NET Core MSBuild. Call to {methodName}. There may be more details in stderr.";

/// <summary>
Expand Down

0 comments on commit 63259a2

Please sign in to comment.