Skip to content
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

make the workload resolver only light up for the specific entrypoint SDKs we control #41268

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

baronfel
Copy link
Member

This is part of #26009

This makes NuGet/Home#13471 easier to diagnose because it removes the workload resolver from the list of resolvers - you can see the before and after here:

before:

D:\temp\test01\test01.csproj : error : Could not resolve SDK "MSTest.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK.
D:\temp\test01\test01.csproj : error :   SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" returned null.
D:\temp\test01\test01.csproj : error :   Unable to resolve 'MSTest.Sdk (= 3.3.1)' for '.NETStandard,Version=v0.0'. PackageSourceMapping is enabled, the following source(s) were not considered: Microsoft Visual Studio Offline Packages, NuGet official package source.
D:\temp\test01\test01.csproj : error MSB4236: The SDK 'MSTest.Sdk' specified could not be found.

after:

E:\Code\Scratch\test-app\test-app.csproj : error : Could not resolve SDK "MSTest.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK.
E:\Code\Scratch\test-app\test-app.csproj : error :   Unable to resolve 'MSTest.Sdk (= 3.3.1)' for '.NETStandard,Version=v0.0'. PackageSourceMapping is enabled, the following source(s) were not considered: nuget.
E:\Code\Scratch\test-app\test-app.csproj : error MSB4236: The SDK 'MSTest.Sdk/3.3.1' specified could not be found.

We save one line here, and with additional work on the MSBuild side we may be able to reduce the MSBuild resolver wrapper noise in this message.

@baronfel baronfel force-pushed the ResolvableSdkPattern-for-workloadresolver branch from 773d911 to 8618076 Compare August 23, 2024 20:20
@baronfel baronfel changed the base branch from release/8.0.4xx to main August 23, 2024 20:21
@baronfel baronfel removed request for a team August 23, 2024 20:21
@dsplaisted
Copy link
Member

The workload resolver also resolves imports from workload packs, using the pack ID. So the pattern as is is insufficient. It needs to cover things like Microsoft.Android.Sdk.net9, Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-x86, and any other workload pack that has targets in it (normally these are imported via the WorkloadManifest.targets files).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants