gpt4 book ai didi

c# - UWP 单元测试调试 "Unable to attach to CoreCLR"

转载 作者:太空狗 更新时间:2023-10-29 22:00:10 25 4
gpt4 key购买 nike

我在为我的 UWP (Windows 10) 项目中的单元测试运行 Debug模式时遇到问题。抛出的错误是:

无法附加到 CoreCLR。不支持互操作调试。

测试窗口的输出显示:

Deployment complete (0:00:00,932). Full package name: "d13697af-b51e-4d46-bbce-4f4b89a44a95_1.0.0.0_x64__h20887da7bcmm"

A user callback threw an exception. Check the exception stack and inner exception to determine the callback that failed.

真正奇怪的是,这并不是每次都会发生。我现在已经成功地调试了我的单元测试几次,直到它失败。补救措施似乎是清理解决方案并重建,之后有时(并非总是)再次尝试几次。然后它开始失败,我需要再次清洁。

我正在为 Windows 10 build 10586 构建,但选择另一个版本似乎并没有什么不同。

最佳答案

我的问题是我从 project.json 文件中删除了 "debugType": "portable", 行。

“构建选项”:{ “调试类型”:“可移植”, “emitEntryPoint”:真 },

关于c# - UWP 单元测试调试 "Unable to attach to CoreCLR",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39919306/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com