microsoft / microsoft/WindowsAppSDK

using AppSdk's 1.8 packages (Microsoft.WindowsAppSDK.*) fail to build when a dependency references AppSdk main package

Open
#5,811 8 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Metapackage
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

Description

### Describe the bug

Trying to build a package referencing AppSdk subpackages (even when referencing all of them) crashes with error, when other dependencies have do reference AppSdk
```msbuild
26>Microsoft.Windows.SDK.BuildTools.MSIX.targets(33,5): Error : The MSIX build tools use the 'CustomBeforeMicrosoftCommonTargets' MSBuild property to wire up a custom .props file that sets some necessary properties. This .props file does not appear to have been imported correctly. This likely means that someone has also overridden 'CustomBeforeMicrosoftCommonTargets', without ensuring to also chain the import of the previously assigned .props and .targets set to that property. You can use a binlog to learn more about where that assignment was done (set the verbosity to diagnostics, and search for 'reassignment: $(CustomBeforeMicrosoftCommonTargets').
```

Using the base Metapackage instead (Microsoft.WindowsAppSDK) works fine.

### Steps to reproduce the bug

Have a project with dependencies that depend on AppSdk: Any of the following examples work
```xml

```

### Expected behavior

Build process to work

### Screenshots

_No response_

### NuGet package version

Windows App SDK 1.8.0: 1.8.250907003

### Packaging type

Unpackaged

### Windows version

Windows 11 version 24H2 LTSC (26100, June Update)

### IDE

Other, Visual Studio 2022

### Additional context

_No response_

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the Microsoft.WindowsAppSDK 1.8.250907003 subpackages and a dependency such as CommunityToolkit.WinUI.Controls.SettingsControls. Start with Microsoft.Windows.SDK.BuildTools.MSIX.targets at line 33, then capture a diagnostic binlog and inspect reassignment of CustomBeforeMicrosoftCommonTargets. Done means the unpackaged project builds successfully with the subpackages and dependent package.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.