Skip to content

Fresh 7.0 dev app fails to build its WinAppSDK head with CS1705 (WinRT.Runtime 2.3.1 vs 2.2.0) #24905

Closed

Description

@MartinZikmund

Current behavior 🐛

A new Uno app created with dotnet new unoapp and moved to the 7.0 dev Uno.Sdk fails to build its WinAppSDK head (net10.0-windows10.0.26100):

CSC : error CS1705: Assembly 'Uno.UI.Extras' with identity 'Uno.UI.Extras, Version=255.255.255.255, ...'
uses 'WinRT.Runtime, Version=2.3.1.0, ...' which has a higher version than referenced assembly
'WinRT.Runtime' with identity 'WinRT.Runtime, Version=2.2.0.0, ...'

It is preceded by a wall of MSB3277 conflict warnings on WinRT.Runtime.

The Uno.WinUI assemblies in lib/net10.0-windows10.0.19041.0 are compiled against the Microsoft.Windows.SDK.NET.Ref 10.0.26100.87 projection (WinRT.Runtime 2.3.1). The .NET SDK 10.0.401 gives the app Microsoft.Windows.SDK.NET.Ref 10.0.26100.57 by default (WinRT.Runtime 2.2.0), and Uno.Sdk does not raise WindowsSdkPackageVersion, so the app compiles against the older runtime.

Expected behavior 🎯

A fresh app builds its Windows head out of the box, without hand-setting WindowsSdkPackageVersion.

How to reproduce it (as minimally and precisely as possible) 🔬

  1. Install the .NET SDK 10.0.401 and the Uno.Templates pack (6.7.30 was used).
  2. dotnet new unoapp -n Repro -preset blank -platforms windows -platforms desktop
  3. In global.json, change the SDK to the dev build: "Uno.Sdk": "7.0.0-dev.32".
  4. dotnet build Repro/Repro.csproj -f net10.0-windows10.0.26100 -c Release
  5. The build fails with CS1705 as above.
  6. Add -p:WindowsSdkPackageVersion=10.0.26100.87 to the same command: Build succeeded.

(Release is used because the Debug build of the same app stops earlier on an unrelated hot design target error.)

Workaround 🛠️

Set the projection package version in the app, either on the command line or in the csproj:

<PropertyGroup>
  <WindowsSdkPackageVersion>10.0.26100.87</WindowsSdkPackageVersion>
</PropertyGroup>

Works on UWP/WinUI 🪟

No

Renderer 🎨

N/A (Windows / WinAppSDK head)

Affected platforms 📱💻🖥️

WinAppSDK (net10.0-windows10.0.26100)

Uno.Sdk version (and other relevant versions) 📦

Uno.Sdk 7.0.0-dev.32, .NET SDK 10.0.401, checked against master commit 1fd0494 (nothing in src/Uno.Sdk sets WindowsSdkPackageVersion there).

IDE version 🛠️

Command line (dotnet build)

Anything else we need to know? 💬

  • Uno.Sdk already has a WinAppSDK-specific targets file where a default could live, for example next to WindowsAppSDKSelfContained in Uno.SingleProject.WinAppSdk.targets. Something like <WindowsSdkPackageVersion Condition="'$(WindowsSdkPackageVersion)' == ''">10.0.26100.87</WindowsSdkPackageVersion> would do, but the exact value must follow whatever version Uno.WinUI is compiled against, and the pin should not lower a version a newer SDK band already picks.
  • Whether newer .NET SDK bands default to 10.0.26100.87 was not checked.
  • The same conflict (worked around with 10.0.19041.87) was noticed in passing in GenerateLibraryLayout puts content in a second lib folder for 4-part Windows TFMs (net10.0-windows10.0.19041.0) #24873 while building a class library, so libraries are likely affected too.

Activity

  1. added
    kind/bug
    platform/uwp 🪟
    triage/untriaged
    difficulty/medium 🤔
    area/sdk
    on Oct 1, 2026
  2. added
    7.0
    on Oct 14, 2026
  3. khaskoul commented on Oct 25, 2026

    @khaskoul

    Update from automated QA of the Uno SDK. This still reproduces on a fresh template app on Uno.Sdk 7.0.0-dev.89, but the failing assembly has changed.

    $ dotnet new unoapp -n QaWin -tfm net10.0 -preset blank -platforms windows      (Uno.Templates 7.0.0-dev.89)
    $ dotnet build -f net10.0-windows10.0.26100                                       (.NET SDK 10.0.401, Debug)
    warning MSB3277: Found conflicts between different versions of "WinRT.Runtime" that could not be resolved.
    CSC : error CS1705: Assembly 'Uno.UI.HotDesign.Client' with identity 'Uno.UI.HotDesign.Client, Version=1.0.0.0, ...' uses 'WinRT.Runtime, Version=2.3.1.0, ...' which has a higher version than referenced assembly 'WinRT.Runtime' with identity 'WinRT.Runtime, Version=2.2.0.0, ...'
    ...\microsoft.windowsappsdk.winui\2.3.9\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(864,9): Xaml Internal Error error WMC9999: Object reference not set to an instance of an object.
    
    Uno.Sdk 7.0.0-dev.89, net10.0-windows10.0.26100 Result
    -c Debug (template default) fails: CS1705 on Uno.UI.HotDesign.Client, then WMC9999
    -c Debug -p:WindowsSdkPackageVersion=10.0.26100.87 (the workaround above) builds, 0 errors
    -c Release, no workaround builds, 0 errors
    Uno.Sdk 6.7.30, -c Debug builds, 0 errors

    So the Uno.WinUI assemblies (Uno.UI.Extras in the original report) no longer trip it in Release. What remains is the Hot Design client: it's compiled against WinRT.Runtime 2.3.1 and referenced only in Debug. That's the configuration a new user builds first.

    Two side notes:

    Not tried: launching the app.

  4. removed
    7.0
    on Oct 29, 2026
  5. added 3 commits that reference this issue on Nov 2, 2026
    a052162
    0dfa38d
    b724b72
  6. khaskoul commented on Nov 8, 2026

    @khaskoul

    Confirmed fixed on Uno.Sdk 7.0.0-dev.179 (after #25836)

    A fresh template app now builds its WinAppSDK head out of the box, without setting WindowsSdkPackageVersion:

    $ dotnet new unoapp -n QaApp -preset blank -platforms windows -tfm net10.0      (Uno.Templates 7.0.0-dev.179)
    $ dotnet build QaApp/QaApp.csproj -f net10.0-windows10.0.26100 -c Debug         (.NET SDK 10.0.401)
    Build succeeded.
        1 Warning(s)      (NETSDK1198, publish profile 'win-AnyCPU.pubxml' not found; unrelated)
    
    net10.0-windows10.0.26100, -c Debug, no WindowsSdkPackageVersion Result
    Uno.Sdk 7.0.0-dev.130 (2 Nov) fails: CS1705 on Uno.UI.HotDesign.Client (WinRT.Runtime 2.3.1 vs 2.2.0), then WMC9999
    Uno.Sdk 7.0.0-dev.179 (7 Nov) builds, no MSB3277 conflicts on WinRT.Runtime, 4 of 4 runs

    Windows 11 Pro (26200), .NET SDK 10.0.401, Uno.Sdk / Uno.Templates 7.0.0-dev.179.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/sdkdifficulty/medium 🤔kind/bugplatform/uwp 🪟triage/untriaged

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions