Skip to content

Using IApplicationActivationManager::ActivateForFile does not work for packaged apps #2856

@lhak

Description

@lhak

Describe the bug

Trying to activate a packaged windows app sdk application using the IApplicationActivationManager::ActivateForFile method (e.g. from a Windows 11 explorer context menu entry component) fails with the following error message:

0x80270254: This app does not support the contract specified or is not installed.

The FileTypeAssociation extension is defined in the manifest and the app can be successfully activated from the corresponding explorer legacy context menu entry. The same manifest entry also works fine for a UWP application.

Interestingly, using the ActivateApplication method works correctly.

Steps to reproduce the bug

  1. Try to start a packaged appsdk application with the ActivateApplication method -> works
  2. Try to start the same app with the ActivateForFile method -> does not work
  3. Try to start a UWP application with the ActivateForFile method -> works

Expected behavior

The ActivateForFile method should work in the same way as for UWP apps.

Screenshots

No response

NuGet package version

1.1.4

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 21H2 (22000)

IDE

Visual Studio 2022

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions