Randomly failing build due to missing SDK
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Describe the bug
After updating to the newest version of Visual Studio on our build servers, build randomly fail due to failure to resolve SDKs.
This also happens with other SDKs, which are specified in `global.json`, such as `Microsoft.NET.Sdk` and `Microsoft.Build.NoTargets`.
### To Reproduce
We are unable to reproduce this issue on developer machines and the error does not happen with every build run. It is an intermittent build flipper.
### Exceptions (if any)
```
Error : Could not resolve SDK "Microsoft.NET.Sdk.Web". 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.
```
### Further technical details
The problem started happening immediately after VS 17.12.4 was installed. We did not see this problem in version 17.10.3.
### Versions & Configurations
```
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.12.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
C:\Program Files\Microsoft Visual Studio\2022\professional>msbuild --version
MSBuild version 17.12.12+1cce77968 for .NET Framework
17.12.12.57101
```
```json
{
"msbuild-sdks": {
...
"Microsoft.Build.NoTargets": "3.7.56",
...
"MSTest.Sdk": "3.7.3"
},
"sdk": {
"version": "8.0.302",
"rollForward": "latestPatch"
}
}
```
NOTE: We did try updating the sdk to version 9.0.100, but the error still happens.
Windows Server 2022 (21H2)
x64
Intel(R) Xeon(R) Gold 6238R CPU @ 2.20GHz, 2195 Mhz, 28 Core(s), 56 Logical Processor(s)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.