WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

Cannot register AppNotification callback without installing Runtime package for Self-Contained Unpackaged app

Open aepot opened this issue 4 weeks ago • 0 comments

Describe the bug

AppNotificationManager.Default.NotificationInvoked += NotificationInvoked;
AppNotificationManager.Default.Register();

Register() throws an Exception:

System.Runtime.InteropServices.COMException: 'The specified module could not be found.

Unable to load resource dll. Microsoft.WindowsAppRuntime.Insights.Resource.dll'

in Self-Contained app.

Steps to reproduce the bug

  1. Create Unpackaged Self-Contained App with Microsoft.WindowsAppSDK.WinUI installed only. Don't use metapackage.
  2. Execute AppNotification callback registration on startup

Expected behavior

Callback registration success without installing Runtime package for Self-Contained app.

Screenshots

No response

NuGet package version

Windows App SDK 1.8.3

<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.7175" />
<PackageReference Include="Microsoft.WindowsAppSDK.WinUI" Version="1.8.251105000" />

Packaging type

Unpackaged

Windows version

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

IDE

Visual Studio 2026 (please update Bug template here in GitHub, add VS 2026 there to the droptown selector)

Additional context

If I install Microsoft.WindowsAppSDK.Runtime package, then it works as expected but as far as I know, that package is not required for Self-Contained apps.

aepot avatar Dec 12 '25 08:12 aepot