TeamCity DotCover searches for source code for nuget dependencies and causes failures when if any found

Assume one build agent and two projects - Project A (no dependencies) and Project B (consumes Project A via nupkg)

Project A: builds, covers, etc correctly.

Project B: builds, but coverage fails.

Build log:

[08:58:08] : Waiting for 2 service processes to complete
[08:58:08] : Processing 1 coverage report(s)
[08:58:08] : Generating coverage report by dotcover for files: [D:\BuildAgent\temp\buildTmp\coverage_dotcover65827760553305838081.data, D:\BuildAgent\temp\buildTmp\coverage_dotcover22329882061164129281.data]
[08:58:08] : Get dotCover version
[08:58:08] : [Get dotCover version] Started dotCover: C:\BuildAgent\tools\dotCover\dotCover.exe version D:\BuildAgent\temp\buildTmp\dotCover5596234087135134313Version
[08:58:08] : [Get dotCover version] Output: JetBrains dotCover Console Runner 10. Build 104.0.20151101.190849
Copyright (c) 2009-2016 JetBrains s.r.o. All rights reserved.

[08:58:08] : [Get dotCover version] dotCover exited with code: 0
[08:58:08] : Use DotCover 10.0.x commands set
[08:58:08] : Merge dotCover reports (1s)
[08:58:10] : [Merge dotCover reports] Started dotCover: C:\BuildAgent\tools\dotCover\dotCover.exe merge D:\BuildAgent\temp\buildTmp\dotcover5547254847039785621.xml
[08:58:10] : [Merge dotCover reports] Output: JetBrains dotCover Console Runner 10. Build 104.0.20151101.190849
Copyright (c) 2009-2016 JetBrains s.r.o. All rights reserved.
[JetBrains dotCover] Snapshot merging started [17/05/2016 8:58:09 AM]
[JetBrains dotCover] Source snapshots number: 2
[JetBrains dotCover] Snapshot merging finished [17/05/2016 8:58:10 AM]

[08:58:10] : [Merge dotCover reports] dotCover exited with code: 0
[08:58:10] : Remove dotCover snapshot files
[08:58:10] : [Remove dotCover snapshot files] Started dotCover: C:\BuildAgent\tools\dotCover\dotCover.exe delete D:\BuildAgent\temp\buildTmp\dotcover5846207103425559934.xml
[08:58:10] : [Remove dotCover snapshot files] Output: JetBrains dotCover Console Runner 10. Build 104.0.20151101.190849
Copyright (c) 2009-2016 JetBrains s.r.o. All rights reserved.

[08:58:10] : [Remove dotCover snapshot files] dotCover exited with code: 0
[08:58:10] : Generate dotCover report (1s)
[08:58:12] : [Generate dotCover report] Started dotCover: C:\BuildAgent\tools\dotCover\dotCover.exe report D:\BuildAgent\temp\buildTmp\dotcover5994345136802041799.xml
[08:58:12] : [Generate dotCover report] Output: JetBrains dotCover Console Runner 10. Build 104.0.20151101.190849
Copyright (c) 2009-2016 JetBrains s.r.o. All rights reserved.
[JetBrains dotCover] Report generation started [17/05/2016 8:58:11 AM]
[JetBrains dotCover] Report generation finished [17/05/2016 8:58:12 AM]

[08:58:12] : [Generate dotCover report] dotCover exited with code: 0
[08:58:12]W: Generate dotCover HTML report
[08:58:12]W: [Generate dotCover HTML report] 1 of 10 source file were not found under the build checkout directory D:\BuildAgent\work\7d9d1ae021930d82. Those files will not be included in dotCover report as source code of classes.
[08:58:12]W: [Generate dotCover HTML report] For example:
d:\buildagent\work\7eec9d38bf54fe66\projectA\projectAexample.cs
[08:58:12] : Packing snapshot files (1s)
[08:58:14] : [Packing snapshot files] Started dotCover: C:\BuildAgent\tools\dotCover\dotCover.exe zip D:\BuildAgent\temp\buildTmp\dotcover2233255254608567009.xml
[08:58:14] : [Packing snapshot files] Output: JetBrains dotCover Console Runner 10. Build 104.0.20151101.190849
Copyright (c) 2009-2016 JetBrains s.r.o. All rights reserved.

[08:58:14] : [Packing snapshot files] dotCover exited with code: 0
[08:58:14] : Remove dotCover snapshot files
[08:58:14] : [Remove dotCover snapshot files] Started dotCover: C:\BuildAgent\tools\dotCover\dotCover.exe delete D:\BuildAgent\temp\buildTmp\dotcover4477241498198427654.xml
[08:58:14] : [Remove dotCover snapshot files] Output: JetBrains dotCover Console Runner 10. Build 104.0.20151101.190849
Copyright (c) 2009-2016 JetBrains s.r.o. All rights reserved.

[08:58:14] : [Remove dotCover snapshot files] dotCover exited with code: 0
[08:58:14] : DotCover statement coverage was: 138 of 190 ( 72.63158%)

 

Coverage would have been 100% had dotcover not analyzed/searched for the source code to this nuget package.

This problem does not occur if these two projects are built on separate build agents.

Please sign in to leave a comment.