dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.68k stars 1.06k forks source link

Consider specifying ResolvableSdkPattern in MSBuild sdk resolvers' manifests. #26009

Open AR-May opened 2 years ago

AR-May commented 2 years ago

Is your feature request related to a problem? Please describe.

This feature improves performance. MSBuild would skip loading additional assemblies with sdk resolvers when they are not needed.

Describe the solution you'd like

After merging this msbuild PR it is possible to add <ResolvableSdkPattern> to manifests of msbuild sdk resolvers. Consider to use it for resolvers Microsoft.DotNet.MSBuildSdkResolver and Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver which live in this repo.

Note that further we would need to keep the pattern up to date. Suggested pattern is Microsoft\.NET.* | <some exceptional cases>

Additional context

See this page for more details about sdk resolution and the recent change of the algorithm in MSBuild.

baronfel commented 4 months ago

We should do this ASAP because it massively improves the user experience for SDK resolution in scenarios like https://github.com/NuGet/Home/issues/13471 - adding this data would effectively remove the workload and 'normal' SDK resolvers from the list of resolvers used for NuGet SDK resolution, leaving only the most likely error messages.

baronfel commented 4 months ago

Specifically: