Windows 10: Clicking Jump List Items for Packaged Apps Prompts How Do You Want to Open This File Dialog

Description

When you click on a jumplist item in a Winforms or WPF app installed via an app package, a “How do you want to open this file” dialog pops up, which shouldn’t happen. The app still runs correctly with the correct arguments from the jumplist item, but this popup appears. If you choose an app to “open the file”, it gives an error saying it can’t find a specific file. This issue doesn’t occur if the app is started normally or through the command line with the same arguments. Many users have reported this problem.

Platform

I’ve reproduced this issue on a Windows 10 VM (Version 22H2, OS Build 19045.4529). It happens on most Windows 10 machines we’ve tested, but not all. I’m not sure how they’re configured differently. When it happens, it happens consistently. It doesn’t appear to happen on Windows 11.

Steps to reproduce

  • Create a new Windows Forms App (.NET Framework) project in Visual Studio.
  • Add the Microsoft.Windows.SDK.Contracts package.
  • Create a jumplist using the following code in Main:
    var jumplist = Windows.UI.StartScreen.JumpList.LoadCurrentAsync().AsTask().Result;
    jumplist.Items.Clear();
    jumplist.Items.Add(Windows.UI.StartScreen.JumpListItem.CreateWithArguments("test", "Test"));
    jumplist.SaveAsync().AsTask().Wait();
  • Add a Windows Application Packaging Project to the solution with default settings and add the first project as a reference.
  • Create app packages for this project using sideloading and default settings.
  • Install and run it. Pin it to the taskbar and close it so that the jumplist is populated.
  • When clicking the Test item in the jumplist, it should now show both the app and the "How do you want to open this file" menu.

I initially reported this as a .NET Framework issue, and you can find more information, including screenshots and a reproduction project, at https://developercommunity.visualstudio.com/t/Clicking-a-jumplist-item-of-packaged-ne/10681229.

This is a known issue in Windows 10 where clicking on a jumplist item for a packaged app in Windows Forms or WPF prompts the “How do you want to open this file” dialog. I’ll walk you through the steps to reproduce and the possible solutions.

Steps to Reproduce:

  1. Create a new Windows Forms App (.NET Framework) project in Visual Studio.

  2. Add the Microsoft.Windows.SDK.Contracts package.

  3. Create a jumplist using the following code in Main:

    var jumplist = Windows.UI.StartScreen.JumpList.LoadCurrentAsync().AsTask().Result;
    jumplist.Items.Clear();
    jumplist.Items.Add(Windows.UI.StartScreen.JumpListItem.CreateWithArguments("test", "Test"));
    jumplist.SaveAsync().AsTask().Wait();
    
  4. Add a Windows Application Packaging Project to the solution with default settings and add the first project as a reference.

  5. Create app packages for this project using sideloading and default settings.

  6. Install and run it. Pin it to the taskbar and close it so that the jumplist is populated.

  7. When clicking the Test item in the jumplist, it should now show both the app and the “How do you want to open this file” menu.

Possible Solution:

  • Install the app locally instead of through a package: The “How do you want to open this file” dialog should not appear if the app is run directly from the executable instead of being sideloaded as a package. This could suggest that the issue lies in how the package interacts with the system.

This issue seems more prominent on Windows 10 platforms, but not all machines exhibit this problem.