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

desktop:ExecutionAlias declared in Package.appxmanifest not working on Windows Server 2019 #4905

Open
HO-COOH opened this issue Nov 21, 2024 · 1 comment

Comments

@HO-COOH
Copy link

HO-COOH commented Nov 21, 2024

Describe the bug

A few users of my app reported that they cannot launch my app on their Windows Server. After some digging, I found on normal Windows 10/11, if the app declares an desktop:ExecutionAlias, it will create an entry in %localappdata%\Microsoft\WindowsApps\. But the folder is empty on Windows Server (2019 17763, to be specific).

I am not sure whether this issue happens to all Windows Server version. But on 17763, I write a demo to test that and it's 100% reproducible.

Steps to reproduce the bug

  1. Create a new WinUI3 C++ project, packaged
  2. Add this under the Application node in Package.appxmanifest
        <Extensions>
            <uap3:Extension Category="windows.appExecutionAlias" Executable="_22_ExecutionAliasNotFound_WinUI.exe" EntryPoint="Windows.FullTrustApplication">
                <uap3:AppExecutionAlias>
                    <desktop:ExecutionAlias Alias="winuiBugTest.exe"/>
                </uap3:AppExecutionAlias>
            </uap3:Extension>
        </Extensions>
  1. Build a msix package, deploy on Windows Server. Run winuiBugTest.exe, and it will report the file is not found.

Expected behavior

The app should run

Screenshots

Image

NuGet package version

Windows App SDK 1.6.3: 1.6.241114003

Packaging type

Packaged (MSIX)

Windows version

No response

IDE

Visual Studio 2022

Additional context

Using uap5 also does not work. And I don't even know what are the differences

            <uap5:Extension Category="windows.appExecutionAlias" Executable="_22_ExecutionAliasNotFound_WinUI.exe" EntryPoint="Windows.FullTrustApplication">
                <uap5:AppExecutionAlias>
                    <uap5:ExecutionAlias Alias="winuiBugTest.exe"/>
                </uap5:AppExecutionAlias>
            </uap5:Extension>

repro

@HO-COOH HO-COOH changed the title desktop:ExecutionAlias declared in Package.appxmanifest not effective on Windows Server 2019 desktop:ExecutionAlias declared in Package.appxmanifest not working on Windows Server 2019 Nov 22, 2024
@DrusTheAxe
Copy link
Member

DrusTheAxe commented Nov 24, 2024

@brialmsft @kanismohammed @sshilov7 is this a code or doc bug? Server 2019 is 17763 aka RS5 (though not Desktop SKU) and the docs for uap3:ExecutionAlias say Minimum OS Version = Windows 10 version 1607 (Build 14393) with no mention of caveat or restriction outside Desktop.

Using uap5 also does not work. And I don't even know what are the differences

Different minimum OS requirements and some functionality. But agreed, the docs are a little confusing and in need of love. I've passed along word to see this addressed.

ExecutionAlias is supported across 5 XML namespaces

Namespace Minimum OS Required
desktop Windows 10 version 1607 (Build 14393)
desktop4 Windows 10, Build 17134, Version 1803
desktop10 Windows 11 - Build 22621
uap3 Windows 10 version 1607 (Build 14393)
uap5 Windows 10 version 1709 (Build 16299)
uap8 Windows 10 version 1903 (Build 18362)

You can spot differences comparing the different pages (though even that seems inconsistently incomplete):

  • desktop10 adds
    Subsystem, UseDesktopChangeRouter, DropTarget, UseUrl, EnvironmentPath, DropTarget, SupportedProtocols
  • desktop4 adds Subsystem
  • uap8 adds AllowOverride

The evolutionary summary seems to be...

  • desktop supports ExecutionAlias
  • uap3 = desktop plus desktop4:Subsystem
  • uap5 = uap3 plus uap10:Subsystem
  • uap8 = uap5 plus uap8:AllowOverride and several desktop10 attributes (UseDesktopChangeRouter, DropTarget, UseUrl, EnvironmentPath, DropTarget, SupportedProtocols)

desktop4 and desktop10 have no doc page but are mentioned on some of the other pages. I'm unsure if that's a a bug or intentional as they're only attributes and the docs only add pages for elements.

https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/what-s-changed-in-windows-10 provides a master namespace / OS version cross-reference. Thus we can fill in the Minimum OS Required fields in the table above despite no doc pages specifically for desktop4 or desktop10

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

2 participants