microsoft / microsoft/WindowsAppSDK
Using IApplicationActivationManager::ActivateForFile does not work for packaged apps
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 471
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
Description
### 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_
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the packaged Windows App SDK case using IApplicationActivationManager::ActivateForFile, then compare it with ActivateApplication and the working UWP case. Inspect the manifest's FileTypeAssociation extension and the Windows 11 21H2 activation behavior; done means ActivateForFile launches the packaged app without 0x80270254.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100