c# - JetBrains 点封面 : Coverage session finished with errors: Out of allowed iteration to generate unique temp name

标签 c# nunit jetbrains-ide dotcover

我从命令行使用 dotCover.exe 生成覆盖率报告,但随机失败并出现此错误:

[JetBrains dotCover] Coverage session finished with errors: Out of allowed iteration to generate unique temp name
  [location] = C:\Build Agent\work\f532b5455ffc19e9\Profiler\Kernel\Windows\Native\Solution\core\src\Util\temp_util.cpp(44)
  [function] = class boost::filesystem::path __cdecl jetbrains::profiler::temp::`anonymous-namespace'::create_temp<class jetbrains::profiler::temp::create_temp_file::<lambda_91d5f1a5933e4e60038be7ca777762a9>,0x010>(const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,class jetbrains::profiler::temp::create_temp_file::<lambda_91d5f1a5933e4e60038be7ca777762a9> &&)
  [file name] = C:\Temp\ft.EC76593C.tmp
  [WIN32 error] = 80, The file exists.

我的命令行是这样的:

dotCover.exe analyse /TargetExecutable=nunit3-console.exe /TargetArguments="unittest1.dll unittest2.dll ... unittest10.dll" /ReportType="html" /Output=CodeCoverage.html /Filters="+:*;-:*.*Tests;-:*.*.Tests;-:*.Tests;-:*.Tests*" /TempDir=C:\Temp\

似乎我尝试覆盖的 DLL 越多,出现此错误的可能性就越大。从错误消息来看,dotCover 似乎是用 C++ 编写的,它正在使用 boost::filesystem::path 创建一个临时文件,但存在一些竞争条件,它会尝试在它所在的位置创建一个新的临时文件已经存在。我的 dotCover 版本是 JetBrains dotCover Console Runner 2017.1.2。构建 108.0.20170428.80910

有谁知道如何修复该错误?

编辑:还有另一个错误导致失败 - Access is denied:

  [function] = class boost::filesystem::path __cdecl jetbrains::profiler::temp::`anonymous-namespace'::create_temp<class jetbrains::profiler::temp::create_temp_file::<lambda_91d5f1a5933e4e60038be7ca777762a9>,0x010>(const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,class jetbrains::profiler::temp::create_temp_file::<lambda_91d5f1a5933e4e60038be7ca777762a9> &&)
  [file name] = C:\Temp2\ft.0A96C261.tmp
  [WIN32 error] = 5, Access is denied.

同样,这也是随机发生的——通常它会失败 3 次,然后在第 4 次成功运行。

最佳答案

有时会遇到这个问题,使用早期访问版本 (JetBrains.dotCover.CommandLineTools.2017.2.20170630.95316-eap06) 使其消失到现在。

Looks like a bug in the dotcover tool opened here .You can download the latest version of dotcover commandline tools from here

编辑:

here获取最新版本的dotcover|因为它已经解决了问题

关于c# - JetBrains 点封面 : Coverage session finished with errors: Out of allowed iteration to generate unique temp name,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44783936/

相关文章:

unit-testing - F# 和 NUnit : Structured output of record types on test failure

java - 如何修复 IntelliJ 2018.1 代码格式

intellij-idea - 如何将 PyCharm 字体设置回默认大小?

c# - 如何解密用 x509 加密的原始 soap 响应

c# - LINQ 首先排序特殊字符?

c# - Asp.net Core 中的 HttpContext 异步安全吗?

java - 自定义 Android Studio 中的创建方法选项

c# - 我可以像在 C# 中那样在 Java 中创建扩展吗?

c# - 创建数据库连接错误NUnit c#

c# - 将模拟参数传递给模拟接口(interface)