How do I use Microsoft.CodeCoverage.Console.exe in a machine without installing Visual Studio?

Kelly Zhao 65 Reputation points Microsoft Employee
2023-12-29T08:24:06.59+00:00

I need to execute a file A in a visual machine B and I would like to understand the code coverage, so I would like to use the Microsoft.CodeCoverage.Console.exe tool while executing the file A.

I have VS installed on my local desktop C, and when I tried locally, the coverage file can be generated correctly.

I don't have Visual Studio installed in that virtual machine, and when I upload the Microsoft.CodeCoverage.Console.exe file from local desktop C to remote machine B, it doesn't generate the report. I believe it gets an error saying Cannot start process because a file name has not been provided.

Could you please provide any advice on how to use the Microsoft.CodeCoverage.Console.exe tool in the remote machine without installing Visual Studio?
Thank you!

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,627 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
329 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anna Xiu-MSFT 25,801 Reputation points Microsoft Vendor
    2023-12-29T12:20:03.91+00:00

    Hi @Kelly Zhao

    Welcome to Microsoft Q&A! 

    I suppose you can’t use the Microsoft.CodeCoverage.Console tool without installing Visual Studio.

    Maybe you can try the dotnet-coverage dotnet tool. Please first run the command dotnet tool install --global dotnet-coverage to install the tool. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

     

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful