首页 > 解决方案 > 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#exceptionresharperxunit

解决方案


在 Visual Studio 中启用Just my Code至少可以防止第一个 Chance 异常使我的输出变得混乱。所以这是一种解决方法......


推荐阅读