WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

Notifications are not sent if app is launched with admin privileges (Issue on WinAppSDK 1.2+)

Open siamn opened this issue 2 years ago • 1 comments

Describe the bug

Notifications are no longer sent when an application is started with admin privileges. Based on testing, this is working in v1.1.4 but broken in v1.2+ (including the latest stable version, version, 1.3.230331000).

Steps to reproduce the bug

  1. Use Template Studio to create a new Win UI 3 project in C# with Windows App SDK v1.2.0 or above
  2. Add notification support when creating the template app
  3. Build and run the app, and observe that the notification is sent on launch. Then clear all notifications.
  4. Relaunch the app, from the start menu, but launch with admin privileges (search app name on start menu -> right click -> Run as administrator). (Alternatively, modify app and package manifest files, so that app requires admin privileges on launch to start)
  5. Observe, that the notification is no longer sent on launch.

Repeat with Windows App SDK v1.1.4 and observe that the notification is still sent when launched with admin priveleges.

Expected behavior

App should be able to send notifications to the user regardless of whether it was started with administrator privileges.

Screenshots

No response

NuGet package version

Windows App SDK 1.3.0: 1.3.230331000

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 22H2 (22621, 2022 Update)

IDE

Visual Studio 2022

Additional context

No response

siamn avatar Apr 24 '23 23:04 siamn