在发布时部署 UWP:错误 0xC0000139:找不到入口点

Deploy UWP on release: error 0xC0000139: Entry Point Not Found

当我想将我的项目部署到我的 Windows Lumia 640 上时,在调试模式下一切正常,但在发布时应用程序立即失败。 异常详情:

Exception thrown at 0x77269C83 (ntdll.dll) in Program.exe: 0xC0000139: Entry Point Not Found. The thread 0x994 has exited with code -1073741511 (0xc0000139). The program '[2296] Program.exe' has exited with code -1073741511 (0xc0000139) 'Entry Point Not Found'.

自从我的 NuGet 包更新后,我真的不知道该怎么做。遗憾的是,这个异常不会定位问题的位置...

这是一个您应该关闭的已知问题 Complie with .net native tool chain

在您的项目中 属性 您可以看到“构建”选项卡。

关闭 Complie with .net native 工具链

那你应该重建项目,它可以运行。

UWP app fails to start because of 'Entry Point Not Found' exception · Issue #267 · xamarin/Xamarin.Auth

我知道这是一个古老的问题,但我仍然每隔一次构建就会遇到这个问题,如果您想部署到 Windows 商店,取消选择“使用 .net 本机工具链编译”不是一个选项。

通过将“项目设置 > 应用程序”下的目标版本更新为最新版本来解决此问题: