DotCover CLI setup difference between 2018.3.4 and 2019.x

We would like to upgrade to the latest dotcover CLI, but have run into some issues.

It seems the dotnet-dotcover.exe file is discontinued which means none of our projects can build anymore. I am hoping this can be resolved centrally (we use a common psakefile.ps1 for all projects). Problem is, we use a mix of dotnet core and .NET Framework projects, even inside single solutions. The old dotcover handled this just fine using a line like this:

Exec { dotnet dotcover test (ls "*.csproj" | % FullName) --framework $testProject.Framework --dcOutput=$dotcoverpartialresult --dcFilters=$dotcoverfilters --dcAttributeFilters="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" --no-build -v n @ExtraDotnetArgs }

Command was looped per project in the solution that was compiled and it worked just fine. Required no csproj changes to work. Also was unaware of which test framework was used. It was great.

The above does not work anymore (with latest dotcover cli 2019.x) as dotnet-dotcover.exe is missing.

It seems I have two choices:

1)

Insert this into each and every csproj file (hundreds of files):

<ItemGroup>
    <DotNetCliToolReference Include="JetBrains.dotCover.DotNetCliTool" Version="2019.2.0.1" />
</ItemGroup>

and then the previous command should continue to work.

or

2)

Replace "dotnet dotcover test" with "dotCover.exe dotnet" in the first mentioned command and remove the "dc" prefix from the options. Not sure what to do with the dotnet options, though. There doesn't seem to be a way to specify any dotnet options (like --no-build and verbosity settings).

 

Or could I copy the dotnet-dotcover.exe from previous cli package to the latest and be done with it?

It is an annoying change. :-(

0

Please sign in to leave a comment.