[xabuild] Probe DOTNET_ROOT for .NET sdks #4474
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: #4467
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=3590265&view=logs&j=96fd57f5-f69e-53c7-3d47-f67e6cf9b93e&t=7b19ceb3-907a-5a0d-b8ed-87e3f7335a58
When trying to integration test dotnet/java-interop#614, the
make all-testsjob fails:Particularly odd about this is that we have an explicit job to install
.NET Core 3.1.100, so why is .NET Core 2.2.402 being used at all?!
Turns Out™ that while .NET Core 3.1.100 was installed, it was
installed into a different prefix; from the
install .NET Core 3.1.100job:and from the
make jenkinsjob output:Thus, the
install .NET Core 3.1.100job is installing .NET Core into$HOME/azdo/_work/_tool/dotnet, whilemake all-testsis onlylooking for .NET Core SDKs within
/usr/local/share/dotnet, whichdoes not contain .NET Core 3.1 at all.
Where does the
make all-testspath come from? It comes fromtools/xabuild, which sets theMSBuildSDKsPathenvironmentvariable, and
xabuilddid not check$DOTNET_ROOT.Update
xabuildso that$DOTNET_ROOTis also probed for .NET Coreinstallation directories, and use the latest .NET Core SDK path
found between
$DOTNET_ROOTand/usr/local/share/dotnet.