c# - JetBrains.ReSharper.TaskRunnerFramework.dll 中的“System.IO.EndOfStreamException”
问题描述
当尝试在调试模式下运行一个非常基本的 xunit 测试时,我的测试项目抛出了几个似乎来自 ReSharper 的异常。
Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
Could not find file 'C:\Temp\test\TestProjekt\TestProjekt\bin\Debug\TestProjekt.xunit.runner.json'.
Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
Could not find file 'C:\Temp\test\TestProjekt\TestProjekt\bin\Debug\xunit.runner.json'.
Managed Debugging Assistant 'LoadFromContext'
The assembly named 'xunit.runner.utility.net452' was loaded from 'file:///C:/Program Files (x86)/JetBrains/Installations/ReSharperPlatformVs15_0a4dd3ad/xunit.runner.utility.net452.dll' using the LoadFrom context. The use of this context can result in unexpected behavior for serialization, casting and dependency resolution. In almost all cases, it is recommended that the LoadFrom context be avoided. This can be done by installing assemblies in the Global Assembly Cache or in the ApplicationBase directory and using Assembly.Load when explicitly loading assemblies.
testException thrown: 'System.Threading.ThreadAbortException' in xunit.execution.desktop.dll
Thread was being aborted.
Exception thrown: 'System.Threading.ThreadAbortException' in xunit.execution.desktop.dll
Thread was being aborted.
Exception thrown: 'System.Threading.ThreadAbortException' in mscorlib.dll
Thread was being aborted.
Exception thrown: 'System.UnauthorizedAccessException' in mscorlib.dll
Access to the path 'TestProjekt.PDB' is denied.
[...]
Exception thrown: 'System.UnauthorizedAccessException' in mscorlib.dll
Access to the path 'TestProjekt.PDB' is denied.
Exception thrown: 'System.IO.EndOfStreamException' in JetBrains.ReSharper.TaskRunnerFramework.dll
Attempted to read past the end of the stream.
The program '[14628] JetBrains.ReSharper.TaskRunner.CLR45.x64.exe: Program Trace' has exited with code 0 (0x0).
The program '[14628] JetBrains.ReSharper.TaskRunner.CLR45.x64.exe' has exited with code 0 (0x0).
到目前为止我已经尝试过:
- 将项目从默认配置文件文件夹移至 c:\temp...
- 使用本地管理员权限启动 Visual Studio 2017
- 将 ReSharper 更新到当前可用的最新版本 (2018.2.1)
- 清除 ReSharper 缓存
- 清洁整个溶液
- 创建新的空类库项目,然后拉入 xunit nuget 包(.NET Framework 4.7.2)
- 降级到 .NET Framework 4.7 的解决方案
- 重新安装 ReSharper 并选择“为所有用户安装”而不是仅我的用户,以确保我的个人资料中没有剩余...
似乎可以在队友的工作站上调试相同的测试项目而没有任何问题......所以我的安装一定有问题。
我在这里做错了什么?有任何想法吗?
解决方案
在 Visual Studio 中启用Just my Code
至少可以防止第一个 Chance 异常使我的输出变得混乱。所以这是一种解决方法......
推荐阅读
- laravel - 创建指向控制器功能的链接并重定向到具有 ID 的另一个页面
- rust - 介绍中的 Actix Web 示例给出了运行时错误线程 'main' 在 'None' 值上的 '称为 `Option::unwrap()` 时惊慌失措
- python - 如何识别编写的 Python 版本代码
- jquery - 带有 div 的 Jquery .sortable() 不起作用
- sh - 什么 shell 为变量 PS1 实现了 POSIX 语义?
- bluetooth-lowenergy - BLE iOS 向 Android gattServer 外围设备发送数据:writeValue:forCharacteristic:type not working
- javascript - JavaScript:使用 Join 使数组成为字符串,使用输入参数作为分隔符 Btw Words --> 替换错误
- python - 为 Django 模型中的评分生成平均值并与其他模型一起返回
- java - 未解决的编译问题:Twitter 无法解析为一个类型
- https - 如何从 Particle 上的网站读取数据