-
-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query: How to get report generator reading arguments from .netconfig #400
Comments
You are not doing anything wrong. I have to fix that behavior. |
Hi @danielpalme, So does that mean cannot use .netconfig feature yet? |
It should work, if you supply at least two dummy command line arguments. |
Ok, thanks @danielpalme. I tried reverting to MS Build. Not as familiar with msbuild. Could not get it working, it gives output that ReportGenerator task was not found. I will wait and use .netconfig fix 👍 <?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="TestCoverage">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<!-- Imported MSBuild tasks -->
<ItemGroup>
<PackageReference Include="ReportGenerator" Version="4.8.1.0" />
<CoverageReport Include="$(MSBuildProjectDirectory)/../CoverageReports" />
</ItemGroup>
<!-- Remove existing coverage, for now do not store history -->
<Target Name="CleanCoverage" BeforeTargets="TestCoverage">
<RemoveDir Directories="@(CoverageReport)" />
</Target>
<!-- Test Coverage -->
<Target Name="TestCoverage">
<ItemGroup>
<CoverageFiles Include="**/coverage.cobertura.xml" />
</ItemGroup>
<ReportGenerator
ProjectDirectory="$(MSBuildProjectDirectory)"
ReportFiles="@(CoverageFiles)"
TargetDirectory="$(MSBuildProjectDirectory)/../CoverageReports"
ReportTypes="Html"
AssemblyFilters="-Minio;-WebApp.Testing.Utils;-WebApp.Testing.Mocks;-xunit.*;-WebApp.Blazor.UnitTests;-Bunit.*;-Humanizer"
ClassFilters="-Cyotek.Collections.Generic.*"
/>
</Target>
</Project> Update, got this working, I had updated project filename and task names and forgot to issue a rebuild |
Great that it works for you. |
Thanks @danielpalme, appreciated :) will give it a try when available |
dotnet reportgenerator
does not appear to be reading arguments from.netconfig
in current working directory. Instead it displays usage information in the console. What am I doing wrong?Name of .netconfig file = .netconfig
Contents of .netconfig file
Output from dotnet reportgenerator
The text was updated successfully, but these errors were encountered: