Skip to content

Uno.Sdk: net10.0-windows10.0.28000 fails with NETSDK1140 until the .NET SDK knows 10.0.28000 #25676

Closed

Description

@xperiandri

What would you like to be added? 💡

Let an Uno.Sdk project target net10.0-windows10.0.28000 (Windows SDK 10.0.28000, projection package Microsoft.Windows.SDK.NET.Ref 10.0.28000.87) without a workaround that every repository has to repeat.

The .NET SDK (10.0.402 and 11.0.100-rc.2) validates the Windows platform version against a list that ends at 10.0.26100, so the build stops with

error NETSDK1140: 10.0.28000.0 is not a valid TargetPlatformVersion for Windows. Valid versions include:
10.0.26100.1
10.0.22621.1
...

A blank Microsoft.NET.Sdk project fails the same way. The .NET SDK side is tracked in dotnet/sdk#55834, where a maintainer plans to add 28000. Uno.Sdk already deals with the same check for its own platforms: Uno.Common.Desktop.targets and Uno.Common.Wasm.targets add <SdkSupportedTargetPlatformVersion Include="$(TargetPlatformVersion)" /> for net10.0-desktop and net10.0-browserwasm, while Uno.Common.WinAppSdk.targets has no such item for the Windows target.

Suggestion: do the same for the Windows target, so that the platform version of the target framework is accepted and WindowsSdkPackageVersion selects the projection package, or at least document a workaround (below). I only tried the workarounds from the application side, not a change inside Uno.Sdk.

Why is this needed? 🤔

Windows SDK 10.0.28000 has been public for a long time (see dotnet/sdk#55834) and its projection package is on nuget.org, but the .NET SDK does not accept it yet. Our solution uses Uno.Sdk 6.7.30 and consumes Uno libraries from git submodules, each with its own Directory.Build.props, Directory.Build.targets and global.json, so the workaround has to be written once per repository and kept until the .NET SDK catches up.

For which platforms 📱💻🖥️

No response

Anything else we need to know? 💬

Workaround 1, from the .NET SDK maintainers in dotnet/sdk#55834 (project file or Directory.Build.props):

<UseWindowsSDKPreview>true</UseWindowsSDKPreview>
<WindowsSdkPackageVersion>10.0.28000.87</WindowsSdkPackageVersion>

Workaround 2, what we use in Directory.Build.targets (with WindowsSdkPackageVersion set in Directory.Build.props):

  <!--
    The .NET SDK knows the Windows SDK platform versions only up to 10.0.26100, and it rejects a target framework
    with a newer one (NETSDK1140). The projection package of 10.0.28000 exists (WindowsSdkPackageVersion in
    Directory.Build.props), so that platform version is added to the list the SDK validates against.
  -->
  <ItemGroup Condition="$(TargetFramework.Contains('-windows'))">
    <SdkSupportedTargetPlatformVersion Include="10.0.28000.0" />
  </ItemGroup>

Both get past NETSDK1140 in a minimal project (<Project Sdk="Uno.Sdk">, <TargetFrameworks>net10.0-windows10.0.28000</TargetFrameworks>, UnoSingleProject) with Uno.Sdk 6.7.30 and .NET SDK 10.0.402. An item named WindowsSdkSupportedTargetPlatformVersion set from Directory.Build.targets does not help, it is read too early.

Activity

  1. added
    kind/enhancement
    triage/untriaged
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementtriage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions