SimpleBrowserDotNet/SimpleBrowser

HtmlLogFormatter dependency on Razorlight beta

mikaelliljedahl opened this issue · 3 comments

If possible, I would prefer having the dependency on RazorLight removed or moved to a separate optinal Package (e.g. SimpleBrowser.HtmlLogging) since as I understand it, it is only used for the HtmlLogFormatter.

RazorLight in turn adds dependencies to a load of other MVC related possibly introducing a nuget version conflict inferno in the projects depending on SImpleBrowser. It is also, according to https://github.com/toddams/RazorLight , not ready for serverless operations (yet).

Another way is to imlement the core part rendering a partial view to a string according to this article instead of having the dependency on another library to do it:

https://www.mikesdotnetting.com/article/332/rendering-a-partial-to-a-string-in-razor-pages

I would still prefer it to be optional.

I thought we were using https://github.com/RickStrahl/Westwind.RazorHosting, not the toddams package. In any case, I don't see why it couldn't be optional - perhaps even only enabled in the release build. We can look at it.

I made a fork where the logging is moved outside the package:
https://github.com/mikaelliljedahl/SimpleBrowser

I just pass the interface to the Render method instead. Sample program has the dependency on the RazorEngine (I switched to another nuget that is more recent to achieve this).

The fork also introduces async versions of all calls to Click(), Navigate(), Submit() and so on.

Not sure why not all the tests pass however.