Share via

Windows SDK 10.0.28000.0 is not a valid TargetPlatformVersion for Windows in .NET C++/CLI projects

Kayser, Steven L 20 Reputation points
2026-06-10T14:56:51.0633333+00:00

I have several managed c++ (C++/CLI) projects with these settings:

    <WindowsTargetPlatformVersion>10.0.28000.0</WindowsTargetPlatformVersion>
    <TargetFramework>net10.0-windows</TargetFramework>

When compiling in Visual Studio 2026 18.7.0, these errors are being reported:

C:\Program Files\dotnet\sdk\10.0.301\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(27
2,5): error NETSDK1140: 10.0.28000.0 is not a valid TargetPlatformVersion for windows. Valid versions include: [project
C:\Program Files\dotnet\sdk\10.0.301\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(272,
5): error NETSDK1140: 10.0.26100.1 [project.vcxproj]

Windows SDK 10.0.28000 is an option when installing Visual Studio 2026 , so why is the .NET SDK not supporting this SDK level?

Developer technologies | .NET | .NET Runtime

Answer accepted by question author

Danny Nguyen (WICLOUD CORPORATION) 7,105 Reputation points Microsoft External Staff Moderator
2026-06-11T08:49:03.1+00:00

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.

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-06-10T14:58:20.23+00:00

    NETSDK1140 is raised because the .NET SDK only recognizes a fixed set of Windows target platform versions for a given TargetFramework. In this case, for TargetFramework = net10.0-windows, the SDK only considers 10.0.26100.1 as a valid TargetPlatformVersion. Even though the Windows SDK 10.0.28000.0 is installed and selectable in Visual Studio, the .NET SDK’s built‑in list of valid versions for windows hasn’t been updated to include 10.0.28000.0, so it rejects it and reports NETSDK1140.

    To build successfully with the current SDK:

    1. Change the Windows target platform version in the project to the valid value reported by the error:
         <WindowsTargetPlatformVersion>10.0.26100.1</WindowsTargetPlatformVersion>
         <TargetFramework>net10.0-windows</TargetFramework>
      
    2. Alternatively, in Visual Studio, retarget the project to a supported Windows SDK version (for example, 10.0.26100.x or “10.0 (latest installed version)”) via the project’s Properties → Configuration Properties → General → Windows SDK Version.

    If targeting 10.0.28000.0 specifically is required, this will only be possible once a .NET SDK version is released that lists 10.0.28000.0 as a valid TargetPlatformVersion for windows.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.