Skip to content
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

Add ReportGenerator.DotnetCorePluginLoader to netstandard2.0 lib folder #508

Closed
MarcoRossignoli opened this issue Apr 5, 2022 · 12 comments

Comments

@MarcoRossignoli
Copy link

MarcoRossignoli commented Apr 5, 2022

Hi @danielpalme,

I'd like to use ReportGenerator.Core to merge and generate html on the fly inside coverlet, but looks like is failing if ReportGenerator.DotnetCorePluginLoader is not found in case of netcore app.

Can you add it to the nestandard2.0 package?

@danielpalme
Copy link
Owner

Hi Marco,
the package ReportGenerator.Core is dedicated to write plugins for ReportGenerator.
I did not have in mind, that it's used directly.

The problem here is, that ReportGenerator.Core targets nestandard2.0.
However ReportGenerator.DotnetCorePluginLoader targets .net:

<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>

Adding the dll to the nestandard2.0 package seems wrong.

Can you share a snippet, of your code which you are using to merge the reports.
I will have look and maybe there's a better solution to work around the problem or that I can provide a better API.

@MarcoRossignoli
Copy link
Author

I was experimenting one idea and I need to be able to merge/generate report on the fly from a netstandard2.0 app and without ReportGenerator.DotnetCorePluginLoader it will fail.

https://github.com/MarcoRossignoli/coverlet/blob/mergereports/src/coverlet.collector/DataCollection/DataCollectorAttachmentProcessor.cs#L49

@danielpalme
Copy link
Owner

Thanks for your code sample.
I will have a look within the next days!

@MarcoRossignoli
Copy link
Author

sure no rush and thanks a lot!

@danielpalme
Copy link
Owner

I tried to to reproduce your problem.
What steps are required to run into an error?
Do you have a unit test or can you give a short step by step description?

@MarcoRossignoli
Copy link
Author

MarcoRossignoli commented Apr 22, 2022

Sry for the late response...this is my sample

https://github.com/MarcoRossignoli/coverlet/blob/mergereports/src/coverlet.collector/DataCollection/DataCollectorAttachmentProcessor.cs#L49

I want to be able to merge/generate report on the fly at the end of the test run and I'd like to use report generator because implements already all the logic.
Project is a netstandard2.0 one and inside the package that lib is missing for netstandard2.0 tfm.

@danielpalme
Copy link
Owner

You already mentioned your sample code above.
That's not my problem.

I want to reproduce your issue. How can I execute your code, so that I run into an error or exception? Is there a unit test?
Or can I create a console application? If yes, should it target net6.0?

Thanks for your input!

@MarcoRossignoli
Copy link
Author

MarcoRossignoli commented Apr 23, 2022

You can create a console app referencing a netstandard2.0 lib that references your package...and run that code(in the sample) inside the netstandard2.0 project.
ConsoleApp -> netstandard2.0 Project -> ReportGenerator.Core
image

@danielpalme
Copy link
Owner

Thanks, now I'm able to reproduce the problem.

@danielpalme
Copy link
Owner

I just published release 5.1.5.
Could you please try again with this version.

@MarcoRossignoli
Copy link
Author

thanks a lot!

@danielpalme
Copy link
Owner

I'm closing this issue. Feel free to reopen if you have any problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants