msbuild
msbuild copied to clipboard
SDK Resolver fails to resolve Microsoft.NET.Sdk.WindowsDesktop intermittently when performing a graph build
Issue Description
The SDK resolver seems to intermittently fail when performing a graph build.
Steps to Reproduce
msbuild /graph
Expected Behavior
A successful build
Actual Behavior
Intermittently,
Error : Unable to locate the .NET SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version.
Error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.
Analysis
This error happens in an internal repo somewhat consistently. Ping me over Teams for details.
Note that this happens in an Azure Pipeline and after a "Use .NET Core" task installs the SDK.
Weirdly, this only happens with Microsoft.NET.Sdk.WindowsDesktop
and not other SDKs. The specific project it happens with is never the same and sometimes the error doesn't happen at all.
Versions & Configurations
17.2