Errors thrown by DotCover on Team City

As of yesterday, one of our builds has started to throw dotCover errors when we try and build on TeamCity - as far as we can tell nothing about the project and\or Team City have changed recently. The errors we are seeing are very unhelpful and depending on which dotcover version we try we either see 

[JetBrains dotCover] Coverage session finished with errors: The root module have to be already loaded or recovered here [location] = c:\build agent\work\f532b5455ffc19e9\profiler\kernel\windows\native\solution\core\src\il\var\../../Profiler/ICollectMetaData.h(13) [function] = bool __cdecl ICollectMetaData::is_root_module_throwable(const unsigned __int64); The root module have to be already loaded or recovered here [location] = c:\build agent\work\f532b5455ffc19e9\profiler\kernel\windows\native\solution\core\src\il\var\../../Profiler/ICollectMetaData.h(13) [function] = bool __cdecl ICollectMetaData::is_root_module_throwable(const unsigned __int64); The root module have to be already loaded or recovered here [location] = c:\build agent\work\f532b5455ffc19e9\profiler\kernel\windows\native\solution\core\src\il\var\../../Profiler/ICollectMetaData.h(13) [function] = bool __cdecl ICollectMetaData::is_root_module_throwable(const unsigned __int64).

Or

Coverage session finished but no snapshots were created.

Has anyone else experienced this sort of issue? I haven't yet found any similar problems.

Thanks

 

 

3 comments
Comment actions Permalink

Hello Stuart,

We used to have an issue that looks similar: DCVR-9571, but I would like to get a bit more information, could you please collect it using the following instruction and attach the log here or with a new issue on our bug tracker? Thank you in advance!

0
Comment actions Permalink

I have the same error, but when running from an Azure Devops pipeline:

 

Test Run Successful.
Total tests: 4
Passed: 4
Total time: 4.5939 Seconds
[JetBrains dotCover] Coverage session finished with errors: The root module have to be already loaded or recovered here
[location] = c:\build agent\work\2e477e1decf4e7a0\profiler\kernel\windows\native\solution\core\src\il\var\../../profilers/collect_metadata_iface.hpp(23)
[function] = bool __cdecl jb::profiler::collect_metadata_iface::is_root_module_throwable(const unsigned __int64); The root module have to be already loaded or recovered here
[location] = c:\build agent\work\2e477e1decf4e7a0\profiler\kernel\windows\native\solution\core\src\il\var\../../profilers/collect_metadata_iface.hpp(23)
[function] = bool __cdecl jb::profiler::collect_metadata_iface::is_root_module_throwable(const unsigned __int64); The root module have to be already loaded or recovered here
[location] = c:\build agent\work\2e477e1decf4e7a0\profiler\kernel\windows\native\solution\core\src\il\var\../../profilers/collect_metadata_iface.hpp(23)
[function] = bool __cdecl jb::profiler::collect_metadata_iface::is_root_module_throwable(const unsigned __int64).
**** - Run Command Line Script.. Ending - ****
 

I added the /LogFile argument to try to gather logs, but the log file is not being written. There doesn't seem to be a /LogLevel argument in the task template, but I tried it anyway:

  - task: DotCover Analyse@0
    displayName: 'Code Coverage Analysis'
    inputs:
      TargetExecutable: 'C:\Program Files\dotnet\dotnet.exe'
      TargetWorkingDir: '${{parameters.sourceRoot}}'
      TargetArguments: 'test ${{parameters.packageName}}.Tests/${{parameters.packageName}}.Tests.csproj'
      ReportType: 'HTML'
      LogLevel: Verbose
      LogFile: 'dotcover.log'
 
However, the command line generated does not include /LogLevel argument, and still no log is produced.
0
Comment actions Permalink

We have the same error in TeamCity running Cake script .

========================================
17:25:35
DotCover
17:25:35
========================================
17:25:35
JetBrains dotCover Console Runner 2017.3.1. Build 111.0.20171222.81232
17:25:35
Copyright (c) 2009-2020 JetBrains s.r.o. All rights reserved.
17:25:36
[JetBrains dotCover] Coverage session started [2020-04-20 17:25:36]
17:25:40
Test run for C:\buildAgent\work\d4c8ad79bbdd75e1\tests\xxxxxxxxxUnitTests\bin\Release\net472\xxxxxxxxxx.UnitTests.dll(.NETFramework,Version=v4.7.2)
17:25:40
Microsoft (R) Test Execution Command Line Tool Version 16.3.0
17:25:40
Copyright (c) Microsoft Corporation. All rights reserved.

....

......
 Test Run Successful.
17:26:03
      Total tests: 34
17:26:03
       Passed: 34
17:26:03
       Total time: 21,8864 Seconds
17:26:04
      [JetBrains dotCover] Coverage session finished with errors: The root module have to be already loaded or recovered here [location] = c:\build agent\work\8fbebfb798cff906\profiler\kernel\windows\native\solution\core\src\il\var\../../profilers/collect_metadata_iface.hpp(23) [function] = bool __cdecl jb::profiler::collect_metadata_iface::is_root_module_throwable(const unsigned __int64); The root module have to be already loaded or recovered here [location] = c:\build agent\work\8fbebfb798cff906\profiler\kernel\windows\native\solution\core\src\il\var\../../profilers/collect_metadata_iface.hpp(23) [function] = bool __cdecl jb::profiler::collect_metadata_iface::is_root_module_throwable(const unsigned __int64); The root module have to be already loaded or recovered here [location] = c:\build agent\work\8fbebfb798cff906\profiler\kernel\windows\native\solution\core\src\il\var\../../profilers/collect_metadata_iface.hpp(23) [function] = bool __cdecl jb::profiler::collect_metadata_iface::is_root_module_throwable(const unsigned __int64).
17:26:04
      An error occurred when executing task 'DotCover'.
17:26:04
  Error: One or more errors occurred.
17:26:04
   DotCover: Process returned an error (exit code -2).
17:26:04
  Process exited with code 1
17:26:04
  Process exited with code 1 (Step: Execute Cake build.ps1 (PowerShell))
17:26:04
  Step Execute Cake build.ps1 (PowerShell) failed

0

Please sign in to leave a comment.