Code Coverage (Missing CodeCoverage.exe)

Bernhard Richter's Avatar

Bernhard Richter

14 Jul, 2017 10:49 AM


I am having trouble with running tests with code coverage using the Visual Studio 2017 image.

Tests are executed using vstest.console.exe /EnableCodeCoverage and as it turns out this requires CodeCoverage.Exe to be present on the machine that executes the tests.

CodeCoverage.exe is not shipped as part of VS 2017 Community Edition.

You can see the build fail here because of the missing CodeCoverage.exe

The following issue explains this a bit more

The strange thing is that with the Visual Studio 2015 image everything works fine

Any ideas?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 20 Jul, 2017 08:54 PM

    Ilya Finkelshteyn's Avatar

    Hi Bernhard,

    Sorry for some delay, we were very busy with recent nuget download issue.

    We have Agents for Visual Studio 2017 installed in addition to Visual Studio itself. Please add the following commands at some point before build, to use vstest.console.exe from Agents for Visual Studio 2017:

    set path=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow;%path%
    copy "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions\appveyor.*" "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions" /y


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

24 Jul, 2017 09:09 PM
24 Jul, 2017 12:39 PM
23 Jul, 2017 12:53 AM
22 Jul, 2017 08:14 PM
22 Jul, 2017 07:59 PM