Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

From AppExecutionAlias startup, AppInstance.GetActivatedEventArgs returns null #5006

Open
Gaoyifei1011 opened this issue Jan 7, 2025 · 0 comments

Comments

@Gaoyifei1011
Copy link

Gaoyifei1011 commented Jan 7, 2025

Describe the bug

From AppExecutionAlias startup, AppInstance.GetActivatedEventArgs returns null

----------------------------

从 AppExecutionAlias 启动时,AppInstance.GetActivatedEventArgs 返回 null

Steps to reproduce the bug

  1. Create the desktop bridge application and add AppExecutionAlias support to the application list.
  2. Input the application name using CMD or PowerShell start the application, the application of the entry point method (the Main method) to obtain AppInstance. GetActivatedEventArgs, actually returns null
----------------------------

1.创建桌面桥应用程序,并在应用清单添加应用启动别名支持(AppExecutionAlias)
2.使用 CMD 或 PowerShell 输入应用程序名称启动应用,在应用的入口点方法(Main 方法)获取 AppInstance.GetActivatedEventArgs,实际上返回的是 null

Expected behavior

Will return like UWP application, start type for CommandLaunch or Launch, with CommandLaunchActivatedEventArgs or LaunchActivatedEventArgs boot parameters

--------------------------------------------

能够像 UWP 应用一样,返回启动类型为 CommandLaunch 或 Launch,带有 CommandLaunchActivatedEventArgs 或 LaunchActivatedEventArgs 的启动参数

Screenshots

Application manifest defines the application entry (application alias - AppExecutionAlias)

--------------------------------------------

应用清单定义应用入口(应用程序别名—— AppExecutionAlias)
Image


Launch the application from the console

--------------------------------------------

从控制台启动应用程序
Image

The Main method gets the application startup type and startup parameters, and returns null

--------------------------------------------

Main 方法获取应用程序启动类型和启动参数,结果返回 null
Image
Image

NuGet package version

Windows App SDK 1.6.3: 1.6.241114003

Packaging type

Packaged (MSIX)

Windows version

Insider Build (xxxxx), Windows 11 version 22H2 (22621, 2022 Update), Windows 11 version 21H2 (22000), Windows 10 version 21H2 (19044, November 2021 Update), Windows 10 version 22H2 (19045, 2022 Update), Windows 10 version 21H1 (19043, May 2021 Update), Windows 10 version 20H2 (19042, October 2020 Update), Windows 10 version 2004 (19041, May 2020 Update), Windows 10 version 1909 (18363, November 2019 Update), Windows 10 version 1903 (18362, May 2019 Update), Windows 10 version 1809 (17763, October 2018 Update)

IDE

Visual Studio 2022

Additional context

This problem exists in all current versions of Windows

--------------------------------------------

这个问题存在当前所有的 Windows 版本中

@Gaoyifei1011 Gaoyifei1011 changed the title From AppExecutionAlias startup, AppInstance GetActivatedEventArgs returns null From AppExecutionAlias startup, AppInstance.GetActivatedEventArgs returns null Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant