-
Notifications
You must be signed in to change notification settings - Fork 182
Move HTML report generator to a razor library #742
Conversation
A comment about this change: it does not attempt to make the report generator more in line with current Razor best practices (ie tag helpers, async partials, etc). It is solely to get the framework in place to remove RazorEngine. An issue here is that the new APIs use async, while our |
@twsouthwick When you mean that it won't work on .NET 4.6.1, is that for systems without .NET Core 2.0 SDK installed? |
Weird - it was telling me I couldn't use it on .NET 4.6.1... let me try again |
services.AddSingleton<DiagnosticSource>(new DiagnosticListener("Microsoft.AspNetCore")); | ||
services.AddLogging(); | ||
services.AddMvc(); | ||
services.AddMvc(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant AddMvc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
@@ -51,7 +55,7 @@ | |||
} | |||
@foreach (var invalidAssembly in reportingResult.GetAssembliesWithError()) | |||
{ | |||
var fileName = Path.GetFileName(invalidAssembly); | |||
var fileName = System.IO.Path.GetFileName(invalidAssembly); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there a collision when we had the @using System.IO
in there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup - there's a property in razor apparently that is Path
So the HTML writer is now available on .NET 4.6.1 builds as well as core - not sure why I was getting errors... probably a point in time thing with changing the projects around. I also updated things to be non-async in #743 and merged those changes here to remove the pesky |
This change replaces RazorEngine with a ASP.NET Core Razor library. Since the MVC libraries only support .NET Standard 2.0, it will not run on .NET 4.6.1, so now HTML reports in offline mode are only supported on core.
Fixes #649