Skip to content

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

Closed

Description

@aepot

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.6

<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.7705" />
<PackageReference Include="Microsoft.WindowsAppSDK.WinUI" Version="1.8.260224000" />

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.

Activity

  1. DominicMaas commented on May 22, 2026

    @DominicMaas

    Still hitting this in 2.1

  2. elibroftw commented on Jul 21, 2026

    @elibroftw

    Still hitting this in 2.3.1

  3. elibroftw commented on Jul 22, 2026

    @elibroftw

    For some reason I can simply catch the exception when unpackaged to let the app not crash, and I still end up seeing notifications. Thankfully the app is packaged with external location in the installer. I just wanted to do some light testing.

  4. dancing-groot commented on Aug 26, 2026

    @dancing-groot

    Confirm still broken on version 2.4.0

  5. torum commented on Sep 17, 2026

    @torum

    WinAppSDK 2.5.1
    Still broken.

  6. aepot commented on Sep 18, 2026

    @aepot
    Author

    torum I guess 2.5.1 doesn't include this fix at all. No mention in release notes.

  7. GenerAhl commented on Sep 18, 2026

    @GenerAhl

    This still reproduces on 2.5.1 with a minimal self-contained repro, even though #6725 is in the v2.5.1 tag. Details and repro are in #6774.

  8. manodasanW commented on Sep 18, 2026

    @manodasanW
    Member

    Fix isn't the release branch yet, it will be soon. I will look into the issue with the tags.

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

    Status: Pending releaseThe issue has been fixed but has not yet shipped in a release.area-NotificationsToast notification, badges, Live Tiles, push notifications

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions