进行了无法编译的编辑。在 VS2019 中使用 Resharper 时

Edits were made which cannot be compiled. When using Resharper in VS2019

我有一个使用 .Net Core 2.1 的多项目解决方案 使用 VS2019 16.3.9 和 Resharper 2019.23 Build 192.0.20191016.60459

如果我尝试 运行 调试测试,它将 运行 一次成功。 在第二个 运行 我会得到错误

Edits were made which cannot be compiled. Execution cannot continue until the compile errors are fixed.

我试过删除 .vs 文件夹

类似的 question is asked here 但我认为值得开始一个新问题,因为这与 Resharper 有关。

我在 VS 单元测试 window 和 Resharper 的测试 window 中得到错误。

这可能是由 Visual Studio 的 Edit & Continue 功能引起的。
解决方法是禁用此功能:

Debug --> Options --> Debugging --> General --> uncheck Enable Edit and Continue

解决方案取自 here

确保你的调试是这样的: