Open
Description
Describe the bug
Microsoft.Windows.ApplicationModel.Background.UniversalBGTask.dll
is copied to the publish output of unpackaged apps, despite not being relevant (it only applies to packaged apps).
Steps to reproduce the bug
- Create a new C# app using the
WinUI Blank App (Packaged)
template - Add
<WindowsPackageType>None</WindowsPackageType>
to the csproj - (optional) Enable NAOT by also adding
<PublishAot>true</PublishAot>
and upgrading the target framework to .NET 9 (this removes a lot of stuff from the output, making the issue more apparent) - Set the build configuration to
Release
in VS - In the solution explorer, right click on the project and hit publish. Then in the window that opens, hit publish, and once it finishes, hit navigate to open the published directory
- Observe the presence of
Microsoft.Windows.ApplicationModel.Background.UniversalBGTask.dll
Expected behavior
This DLL should not be present
Screenshots
NuGet package version
Windows App SDK 1.7.1: 1.7.250401001
Packaging type
Unpackaged
Windows version
Windows 11 version 24H2 (22621, October 2024 Update)
IDE
Visual Studio 2022-preview
Additional context
No response