Reportgenerator: `dotnet test --configuration release` exception with 4.2.17

Created on 3 Sep 2019  路  3Comments  路  Source: danielpalme/ReportGenerator

I am running with dotnet test --configuration release in .net core 2.1.

The short switch '-property:Configuration=release' is not defined in the switch mappings.
   at Microsoft.Extensions.Configuration.CommandLine.CommandLineConfigurationProvider.Load()
   at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
   at Palmmedia.ReportGenerator.Core.Generator.GetConfiguration() in d:\a\1\s\src\ReportGenerator.Core\Generator.cs:line 270
   at Palmmedia.ReportGenerator.Core.Generator.GenerateReport(IReportConfiguration reportConfiguration) in d:\a\1\s\src\ReportGenerator.Core\Generator.cs:line 42

Here's how I'm including it in my targets file:

  <PropertyGroup Label="Coverlet Options">
    <!-- See https://github.com/tonerdo/coverlet for more options -->
    <!-- TODO <CollectCoverage>true</CollectCoverage> -->
    <CoverletOutput>$(MSBuildProjectDirectory)\..\gen\test-coverage\$(MSBuildProjectName)\</CoverletOutput>
    <CoverletOutputFormat>lcov,json,opencover</CoverletOutputFormat>
    <Threshold>15</Threshold>
    <Exclude>$(Exclude),[xunit*]*</Exclude>
    <Include>$(Include),[$(AssemblyName.Replace(".UnitTests", ""))]*</Include>
    <ExcludeByFile>$(ExcludeByFile),$(MSBuildThisFileDirectory)/src/*</ExcludeByFile>
    <ExcludeByAttribute>$(ExcludeByAttribute),GeneratedCodeAttribute,CompilerGeneratedAttribute</ExcludeByAttribute>
  </PropertyGroup>

  <Target Name="GenerateCoverageReport" AfterTargets="GenerateCoverageResult">
    <ItemGroup>
      <CoverageFiles Include="$(CoverletOutput)\*.xml" />
    </ItemGroup>
    <ReportGenerator ReportFiles="@(CoverageFiles)" TargetDirectory="$(CoverletOutput)\html" ReportTypes="Html" />
  </Target>

dotnet test works appropriately.

bug

All 3 comments

Will have a look at the problem within the next 1-2 days.

Minimum project to reproduce issue:
Sample.zip

Release 4.2.19 should be available in a few minutes.
Could you please try again?

looks good. thanks.

Was this page helpful?
0 / 5 - 0 ratings