Error encountered when running dotcover console ru

2019-08-09 19:50发布

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条回答
来,给爷笑一个
2楼-- · 2019-08-09 20:19

the msbuild runner is not an executable. It is invoked by MSBuild.exe. Try using the xunit.runner.console package

查看更多
登录 后发表回答