Skip to content
Discussion options

You must be logged in to vote

Okay so after some digging, this is apparently normal in WinUI3. There is a workaround solution provided in this repo in which the application registers itself with a key and any subsequent launches are checked against it. If it detects that an application instance is already running, the arguments are forwarded to that instance and the new process is killed.

Here's the gist of it :

protected async override void OnLaunched(LaunchActivatedEventArgs args)
{
    var activatedArgs = AppInstance.GetCurrent().GetActivatedEventArgs();
    var mainInstance = AppInstance.FindOrRegisterForKey("main");

    if (mainInstance.IsCurrent is not true)
    {
        await mainInstance.RedirectActivationTo…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@BertrandDeSaintBezier
Comment options

@BertrandDeSaintBezier
Comment options

Answer selected by BertrandDeSaintBezier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants