-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand MSBuildSdkResolver #45364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
surayya-MS
merged 22 commits into
dotnet:main
from
surayya-MS:expand-MSBuildSdkResolver
Dec 13, 2024
Merged
Expand MSBuildSdkResolver #45364
surayya-MS
merged 22 commits into
dotnet:main
from
surayya-MS:expand-MSBuildSdkResolver
Dec 13, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
baronfel
reviewed
Dec 6, 2024
src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs
Outdated
Show resolved
Hide resolved
When this is merged, we will want to backport to release/9.0.2xx so that this will ship in a version of VS that Roslyn can use to begin testing. If we don't backport, they would have to wait until we had an insertion of .NET 10 into VS, which is quite a while away. |
Open
3 tasks
baronfel
approved these changes
Dec 12, 2024
test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnMSBuildSdkResolver.cs
Outdated
Show resolved
Hide resolved
src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs
Outdated
Show resolved
Hide resolved
src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs
Outdated
Show resolved
Hide resolved
src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs
Outdated
Show resolved
Hide resolved
src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs
Outdated
Show resolved
Hide resolved
src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs
Outdated
Show resolved
Hide resolved
check only "dotnet.exe"; log if couldn't set DOTNET_HOST_PATH and SdkResolverMSBuildTaskHostRuntimeVersion
rainersigwald
approved these changes
Dec 13, 2024
src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnMSBuildSdkResolver.cs
Outdated
Show resolved
Hide resolved
rename const variables
YuliiaKovalova
approved these changes
Dec 13, 2024
/backport to release/9.0.2xx |
Started backporting to release/9.0.2xx: https://github.com/dotnet/sdk/actions/runs/12323103032 |
This was referenced Feb 18, 2025
This was referenced Mar 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes dotnet/msbuild#11086
Context
Details - Here's the flow for sdk resolution in msbuild repo
MSBuildSdkResolver
is in resolver list only in case ofmsbuild.exe
.MSBuildSdkResolver
is not present in case ofdotnet build
. Hence,Muxer
is not available inmsbuild.exe
context as the corresponding issue description suggests.Changes
DOTNET_HOST_PATH
to theSdkResult.PropertiesToAdd
with value of the path ofdotnet.exe
similar to dotnet CLI does before triggering buildsSdkResolverMSBuildTaskHostRuntimeVersion
to theSdkResult.PropertiesToAdd
with value of the runtime version MSBuild uses (fromMSBuild.runtimeconfig.json
file) similar toMuxer.SharedFxVersion
Testing
Manually tested by building sdk repo with
build.cmd
, then copyingMicrosoft.DotNet.MSBuildSdkResolver.dll
to msbuild, then runningmsbuild.exe
on a console app. Result -DOTNET_HOST_PATH
andSdkResolverMSBuildTaskHostRuntimeVersion
are present in the binlog as a property in Evaluation phase.Added check for
DOTNET_HOST_PATH
andSdkResolverMSBuildTaskHostRuntimeVersion
keys in unit tests.