Unable to activate Windows Store app (Visual Studi

2019-02-08 02:14发布

问题:

Today I updated my Windows 10 PC to Threshold 2. The update went fine apart from Visual Studio refusing to run any of my Universal Windows 10 projects (including new ones).

When I try run an app I get this message:

Unable to activate Windows Store app '{App}'. The {App name}.exe
process started, but the activation request failed with error 'The app
didn't start'.

I have tried everything:

  • Repairing / Uninstalling then Installing Visual Studio
  • Cleaned the Solution
  • Deleted the 'bin' and 'obj' folders
  • Checked for SDK/Visual Studio updates
  • Checked if there was an app.json (there wasn't)
  • Updated Nuget Packages
  • Tried different projects (including new blank ones - same errors)
  • Resetting Windows (from settings screen)

Extra Info

  • Visual Studio is installed on a second (storage) drive, as my main drive is a small SSD.
  • Everything worked fine before I upgraded.

回答1:

I managed to fix the problem by checking the box "Compile with .NET Native tool chain" under project's "Properties --> Build" -tab.

similarly in official troubleshooting page this Native and cleanup tips are mentioned



回答2:

Turns out that my Visual Studio projects must be on my C:/ drive and not a storage drive. All fixed.



回答3:

Since correct answer does not work for me, I found another bad solution: change your package name for debugging purposes.

Important: you should stop debugging via stop button, not via App`s close button.