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

Using ReportGenerator in MSBuild is broken with dotnet core sdk 3.1.200 #335

Closed
jon-armen opened this issue Mar 27, 2020 · 4 comments
Closed
Labels

Comments

@jon-armen
Copy link

Using global.json to control the specific sdk being used, when the sdk is 3.1.100, the report is created normally. When sdk is 3.2.100, the report fails to create with the following stacktrace:

2020-03-27T06:45:54: Sequence contains no elements
2020-03-27T06:45:54:    at System.Linq.ThrowHelper.ThrowNoElementsException()
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   at Palmmedia.ReportGenerator.Core.Plugin.ReflectionPluginLoader.CreateAssemblyLoader() in C:\Users\jarmen\Downloads\ReportGenerator-master\ReportGenerator-master\src\ReportGenerator.Core\Plugin\ReflectionPluginLoader.cs:line 118
   at Palmmedia.ReportGenerator.Core.Plugin.ReflectionPluginLoader..ctor(IReadOnlyCollection`1 plugins) in C:\Users\jarmen\Downloads\ReportGenerator-master\ReportGenerator-master\src\ReportGenerator.Core\Plugin\ReflectionPluginLoader.cs:line 39
   at Palmmedia.ReportGenerator.Core.Generator.GenerateReport(IReportConfiguration reportConfiguration, Settings settings, RiskHotspotsAnalysisThresholds riskHotspotsAnalysisThresholds) in C:\Users\jarmen\Downloads\ReportGenerator-master\ReportGenerator-master\src\ReportGenerator.Core\Generator.cs:line 100

For some reason, in ReflectionPluginLoader.CreateAssemblyLoader typeof(IAssemblyLoader).IsAssignableFrom(t) returns false. Generator is being run using ReportGenerator msbuild task

@danielpalme
Copy link
Owner

Thanks for reporting this issue. Will have look at the problem.

@danielpalme
Copy link
Owner

I was able to reproduce your issue.

I opened an issue here: dotnet/sdk#11043

@danielpalme
Copy link
Owner

In release 4.5.3 I introduced a workaround to this problem.
The release should be available in a few minutes.

Could you please give it a try?

@jon-armen
Copy link
Author

All good! Thank you for the quick fix (work around).

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

No branches or pull requests

2 participants