Use dotCover report on same build


I'm trying to add dotCover coverage to NDepend report on TeamCity.

I know how to do it with two builds:
- One builds my code and generate the coverage report using dotCover. It creates artifacts for DLLs, PDBs and dotCover report.
- The other one has artifact dependencies getting DLLs, PDBs and dotCover snapshot from first one and parses dotCover report to NDepend expected format and run the NDepend static code analysis.
You can see this configuration deeply here.

The problem arrive when I want to do it all in the same build:
Is there any way to get the dotCover report on the same build (obiously on a next step) before generating the artifact?
As far as I know, TeamCity stores dotCover files on\dotCover.snapshot.
I can take parameter but not next path folder because it seems to be a random name.
So, if I could know full path, I could add a build step between dotCover step and NDepend steps copiyng the file I need to my workingFolder

Any idea to solve this?
Is it possible to do it?

Thanks in advance.

Comment actions Permalink


The recommended solution is to use different build configurations with dependencies. Why it does not fit in your case?
We have a related feature request to new parameter - path to temp file and also a feature request to support NDepend, please watch/vote for them.

As current workaround you can add a Command Line build step after your Coverage have completed with script, which will copy needed files from to

Comment actions Permalink

Hi Alina and first of all thanks for your fast response.

I've just vote for feature request to include a parameter to the temp folder.

Support NDepend feature request is great. More over, a comment of Laurent Kempé links us to the same post I link above.

The current workaround you propose me is the same I explain on my original post. Maybe I didn't explain my self clearly enough, so I exlain again the problem of this workaround: leave me one folder before the full path to the dotCover.snapshot file, the one that I want to use.
I wouldn't like do an script step scannning all subfolders looking for the last edited dotCover.snapshot file.
Is there any better or more elegant way to get the desired file?

Comment actions Permalink


Unfortunately we cannot provide better workaround now.


Please sign in to leave a comment.