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
Package as a DotNetCliTool #130
Conversation
…t core assemble with "dotnet ReportGenerator"
Just noticed that I didn't test all the report formats, and some of those assemblies are required. Will be updating this PR shortly. |
…erator.Core, setup ReportGenerator.Core to be released as independant nuget package
Thanks for your PR. I have some questions on the changes you made:
|
@danielpalme - I moved things from As for the separate Nuget package for Core, I created that mostly out of the desire to implement ReportGenerator's output into https://github.com/tonerdo/coverlet without having to run a separate CLI command. Having the netstandard2.0 lib available as a separate package will let coverage tools reference the Generator functionality directly. In my companies nuget feed, I currently have custom With this PR, there are 3 ways to generate reports.
|
As a clarification, the second NuGet package is the netstandard library, not the console app. Both the dotnet and 4.7 console apps are still packaged in the same package supporting both platforms. |
I'm in the process of merging your PR. I spent some time to figure out which DLLs are really required in the Nuget package. Again some questions:
|
The first and second bullet can be explained with the Tools Extensibility Documentation. tl;dr; - currently the dotnet cli requires assembly files to be prefixed by "dotnet-" in order to run with "dotnet MyName" For the third bullet point, I only added it to a new netcoreapp2.0 project by directly adding it to the .csproj. I'm not sure if that breaks backwards compatibility with the ".exe" assembly. Do people usually add the package to their project in order to use the EXE tool? If not, I'd be happy to modify README to make it clear what needs to be done to install as a tool for use with "dotnet ReportGenerator [options]". |
@danielpalme - I did a little more research, and this documentation suggests that we might actually not be able to package both together because of the DotNetCliTool package type. We could do what XUnit does, and create a separate "dotnet-reportgenerator" package like they do with "dotnet-xunit". That would give us a total of 3 packages:
Let me know your thoughts and I'd be happy to update this PR to reflect that structure. I've got the changes locally, and can add the ReportGenerator package to a .NET Framework console app and access ReportGenerator.exe through the PM console as well as add the DotNetCliToolReference and generate reports on a .NET Core app with "dotnet reportgenerator". |
Thanks for your input, i will split the Nuget packages myself and add some help/description to guide users to the "correct" package.
|
Current status:
|
This will enable someone to add a
<DotNetCliToolReference>
reference to their test project and call the assembly using something similar to:dotnet ReportGenerator -reports:coverage.xml -reporttypes:HTML -targetdir:report
I've tested this using both the dotnet cli on a Mac and the
ReportGenerator.exe
assembly on a Windows machine.