问题
I am using the DotCover console runner to check out the code coverage. Here is the command line I used -
C:.\dotcover.exe cover /TargetExecutable="C:\packages\xunit.1.9.2\ lib\net20\xunit.runner.msbuild.dll" /TargetArguments="C:\bin\myConfigFolder\My.Tests.dll" /Output="c:\temp\CoverageReport.html" /ReportType="HTML"
But I am getting the message below -
JetBrains dotCover Console Runner v2.7.4.24. Copyright (c) 2009-2015 JetBrains s.r.o. All rights reserved.
[JetBrains dotCover] Coverage session started [9/30/2015 4:22:46 PM]
[JetBrains dotCover] Coverage session finished with errors: Can't start application. See below for more details:
The specified executable is not a valid application for this OS platform...
The DLL I used was from Visual Studio, and my project is a simple test project written in C#. And I have tried to run the command line from both CMD console and Powershell, but ending up with the same error.
Could someone please shed some lights on this?
回答1:
the msbuild runner is not an executable. It is invoked by MSBuild.exe. Try using the xunit.runner.console package
来源:https://stackoverflow.com/questions/32877281/error-encountered-when-running-dotcover-console-runner-using-xunit-as-the-target