.NET: Microsoft Technologies based on the .NET software framework. Runtime: An environment required to run apps that aren't compiled to machine language.
Hi @Kayser, Steven L ,
I tested this with a small C++/CLI .NET project and I can reproduce the same NETSDK1140 error when using:
<WindowsTargetPlatformVersion>10.0.28000.0</WindowsTargetPlatformVersion>
<TargetFramework>net10.0-windows</TargetFramework>
On my side, changing the Windows target platform version to an older installed SDK version, for example:
<WindowsTargetPlatformVersion>10.0.22621.0</WindowsTargetPlatformVersion>
allows the project to build.
So this does not seem to be only about whether Windows SDK 10.0.28000.0 is available in the Visual Studio installer. The build is failing because the .NET SDK validation does not currently accept 10.0.28000.0 as a valid TargetPlatformVersion for this project configuration.
The related .NET SDK documentation explains that TargetPlatformVersion is inferred from the target framework and is used by .NET to determine which platform APIs are available at compile time:
NETSDK1135: SupportedOSPlatformVersion can't be higher than TargetPlatformVersion
For now, the practical workaround is to retarget the project to a Windows SDK version that the current .NET SDK accepts, such as an older installed SDK version like 10.0.22621.0.
I would also suggest reporting this through Visual Studio Developer Community so the product team can review it. Microsoft’s Visual Studio guidance says Developer Community tracks Visual Studio issues and feature suggestions, and the Report a Problem flow is intended to help the Visual Studio teams diagnose and fix issues. https://developercommunity.visualstudio.com/VisualStudio
If any part of the explanation helped clarify your problem, I would greatly appreciate it if you could follow the instructions here. This can help other community members facing similar scenarios.