You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If everything works as expected, the layout renderer can be added with the same name to NLog.Web. It should overwrite the one from core. (double check that).
Steps:
Create a subclass of the current layout renderer in NLog.Web, same name, different namespace.
Implement proposed code
Test with unit test in NLog.web
The text was updated successfully, but these errors were encountered:
moved from NLog/NLog#275
reported by @slolife:
the
${assembly-version}
layout renderer returns "Could not find entry assembly" in ASP.NET. It seems that:var assembly = Assembly.GetEntryAssembly();
Returns null in ASP.NET situations.
There is a StackOverflow question/answer that seems to have a solution:http://stackoverflow.com/a/4803419/698For myself, I've been able to make it work with:Assembly assembly = HttpContext.Current == null ? Assembly.GetEntryAssembly() : Assembly.GetExecutingAssembly();
edit:
this only works in the assembly itself
Steps
If everything works as expected, the layout renderer can be added with the same name to NLog.Web. It should overwrite the one from core. (double check that).
Steps:
The text was updated successfully, but these errors were encountered: