激活 Windows 商店应用程序...失败,出现错误“应用程序未启动”

Activation of the Windows Store app ... failed with error 'The app didn't start'

问题

无法在 Release/x86 中启动任何 UWP 应用程序(空白应用程序、UWP 示例)。

不过,Debug/x86、Debug/x64、Release/x64都可以。

相关

  1. 构建 -> 配置管理器
  2. 新...
  3. 从调试复制设置
  4. 同样的错误

错误

Visual Studio输出

Symbols for ntdll.dll could not be downloaded from the Microsoft Symbol Servers. Exception settings and call stacks may not work correctly.  Make sure you have a network connection and try again.'App1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.

The thread 0x2e74 has exited with code -1073741792 (0xc0000020).
The thread 0x780 has exited with code -1073741792 (0xc0000020).
The thread 0x1930 has exited with code -1073741792 (0xc0000020).
The thread 0x1b24 has exited with code -1073741792 (0xc0000020).
The program '[13492] App1.exe' has exited with code -1073741792 (0xc0000020).
Activation of the Windows Store app '451e4789-01f8-4e4e-b28d-fbfa813a4513_v5p8rpnswjrxg!App' failed with error 'The app didn't start'.

事件查看器 #1

Activation via contract helper of the app 451e4789-01f8-4e4e-b28d-fbfa813a4513_v5p8rpnswjrxg!App for the Windows.Launch contract failed with Server execution failed.

事件查看器#2

Activation of the app 451e4789-01f8-4e4e-b28d-fbfa813a4513_v5p8rpnswjrxg!App for the Windows.Launch contract failed with error: The app didn't start..

事件查看器 #3

ActivateApplicationForContractByAppIdAsUserWithHost of the app 451e4789-01f8-4e4e-b28d-fbfa813a4513_v5p8rpnswjrxg!App for the Windows.Launch contract failed with The app didn't start..

复制

新建项目 -> Visual C#/空白应用程序(通用 Windows)

环境

尝试过

我在这上面浪费了几天时间。请帮忙。

消息和天气应用程序也出现同样的错误。

解决方法如下...

  1. 打开天气应用程序
  2. 会弹出错误,点击存储link
  3. 重新安装天气应用(忽略安装错误)

为了让 C# UWP 在调试中达到 运行,我转到“属性”->“构建”并选中“使用 .NET Native 工具链编译”。这让我可以调试。