Skip to content

Debug build of the WinAppSDK head fails with MSB4057: target "_UnoAddLibraryAssets" does not exist (Uno.UI.HotDesign.props) #24983

Closed

Description

@MartinZikmund

Current behavior 🐛

A Debug build of an app that targets the WinAppSDK head (net10.0-windows10.0.26100) with Uno.Sdk 7.0.0-dev.32 fails immediately:

Uno.UI.HotDesign.props(82,4): error MSB4057: The target "_UnoAddLibraryAssets" does not exist in the project.

The Uno.UI.HotDesign package (pinned by the SDK packages.json and referenced in Debug only) ships build/Uno.UI.HotDesign.props with a CollectHotDesignAssets target:

<Target Name="CollectHotDesignAssets"
        BeforeTargets="GenerateMSBuildEditorConfigFileShouldRun;GenerateMSBuildEditorConfigFileCore"
        DependsOnTargets="ResolveProjectReferences;ResolveReferences;AssignTargetPaths;_UnoAddLibraryAssets"
        Condition="'$(HotDesignUnoAssets)' == '' and '$(IsUnoHead)' == 'true' and '$(DesignTimeBuild)' != 'true'">

IsUnoHead is true on the WinAppSDK head (the Uno.Sdk sets it), but _UnoAddLibraryAssets is defined in Uno.UI.Tasks (uno.ui.tasks.assets.targets), which is not part of a WinAppSDK head build. DependsOnTargets is evaluated even though the body would be skipped for that head, so MSBuild fails with MSB4057.

Expected behavior 🎯

A Debug build of the WinAppSDK head succeeds. The asset collection should only depend on _UnoAddLibraryAssets when that target exists (for example via a conditional DependsOnTargets property), or be skipped on the WinAppSDK head.

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

  1. Create an empty folder with global.json:
    { "msbuild-sdks": { "Uno.Sdk": "7.0.0-dev.32" } }
  2. Add App.csproj:
    <Project Sdk="Uno.Sdk">
      <PropertyGroup>
        <TargetFrameworks>net10.0-windows10.0.26100</TargetFrameworks>
        <OutputType>Exe</OutputType>
        <UnoSingleProject>true</UnoSingleProject>
        <UnoFeatures></UnoFeatures>
      </PropertyGroup>
    </Project>
  3. Add a minimal App.xaml / App.xaml.cs (an empty Application subclass).
  4. Run dotnet build -c Debug.
  5. Observe the MSB4057 error above. dotnet build -c Release does not reference Hot Design.

Workaround 🛠️

Set a non-empty HotDesignUnoAssets for the WinAppSDK head so the target's condition skips it (this also skips the DependsOnTargets evaluation of the body):

<PropertyGroup Condition="$(TargetFramework.Contains('-windows'))">
  <HotDesignUnoAssets>-</HotDesignUnoAssets>
</PropertyGroup>

Renderer 🎨

N/A (build error)

Affected platforms 📱💻🖥️

WinAppSDK (Windows) head, Debug configuration.

Uno.Sdk version (and other relevant versions) 📦

Uno.Sdk 7.0.0-dev.32 (Uno.WinUI 7.0.0-dev.1429, which resolves Uno.UI.HotDesign 1.24.0-dev.10), .NET SDK 10.0.400. Also seen with Uno.UI.HotDesign 1.23.0-dev.251 on Uno.Sdk 7.0.0-dev.17.

IDE version 🧑‍💻

CLI (dotnet build)

Anything else we need to know? 💬

Confirmed by a real build, not by inspection. Related: #24297 tracks the other 7.0 incompatibilities of the same Hot Design package graph.

Activity

  1. added
    kind/bug
    triage/untriaged
    area/build
    difficulty/starter 🚀
    area/sdk
    on Oct 5, 2026
  2. MartinZikmund commented on Oct 11, 2026

    @MartinZikmund
    MemberAuthor

    Still reproduces with a fresh dotnet new unoapp -preset blank --platforms windows --platforms desktop app on Uno.Sdk 7.0.0-dev.67 (pins Uno.UI.HotDesign 2.0.0-dev.2), .NET SDK 10.0.401: dotnet build -f net10.0-windows10.0.26100 -c Debug fails with Uno.UI.HotDesign.props(82,4): error MSB4057: The target "_UnoAddLibraryAssets" does not exist in the project. -c Release builds fine.

    A fix for the Hot Design package has been merged, but it is not in the version the SDK pins yet.

  3. added
    7.0
    on Oct 14, 2026
  4. removed
    7.0
    on Oct 29, 2026
  5. MartinZikmund commented on Nov 2, 2026

    @MartinZikmund
    MemberAuthor

    Fixed by unoplatform/uno.hotdesign#8273 (tracked in unoplatform/uno.hotdesign#8270, QA verified): Hot Design 2.0.0-dev.12 and later no longer reference the missing _UnoAddLibraryAssets target. The published Uno.Sdk 7.0.0-dev.127 (built from uno.templates) pins Uno.UI.HotDesign 2.0.0-dev.31, so Debug builds of the WinAppSDK head no longer fail with MSB4057.

    Closing as fixed and moving to Ready for QA Review on the team board.

  6. khaskoul commented on Nov 9, 2026

    @khaskoul

    Scope: Windows head, Debug (Hot Design is referenced in Debug only). Evidence: TPL-11 (WinAppSDK unpackaged app, Debug build exit 0, 0 errors, 1 warning NETSDK1198) and a second app (-platforms desktop windows, Group E) built for net10.0-windows10.0.26100 Debug: Build succeeded, 0 errors. SDK pins Uno.UI.HotDesign 2.0.0-dev.55 (fix is in 2.0.0-dev.12+).

    Verified fixed on Uno.Sdk 7.0.0-dev.179.

    Environment: Windows 11 Pro (26200), .NET SDK 10.0.401, Uno.Sdk / Uno.Templates 7.0.0-dev.179 (Uno.WinUI 7.1.0-dev.90).

    Debug build of the WinAppSDK head (net10.0-windows10.0.26100) of two freshly generated apps: "Build succeeded", 0 errors, no MSB4057 (only the unrelated NETSDK1198 warning about a missing win-AnyCPU.pubxml). The SDK now pins Uno.UI.HotDesign 2.0.0-dev.55.

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

    area/buildarea/sdkdifficulty/starter 🚀kind/bugtriage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions