-
Notifications
You must be signed in to change notification settings - Fork 151
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
Move the extension method that need Microsoft.AspNet.Hosting
into ex NLog.Extensions.Logging.Hosting
#25
Comments
Microsoft.AspNet.Hosting
into ex NLog.Extensions.Logging.Hosting
Microsoft.AspNet.Hosting
into ex NLog.Extensions.Logging.Hosting
That's a good idea, but we need then an additional (NuGet) package? The code that uses |
Maybe we have to move all the aspnet5 stuff to https://www.nuget.org/packages/NLog.Web.ASPNET5 It has already a dependency to Microsoft.aspnet.hosting. |
Remember that .net core is not just for ASP.NET, therefore we preferably need NLog support without dependencies on the ASP.NET parts. Microsoft's naming convention appears (looking at the rc2 and rc3 packages that have started appearing) to be adding .dnx onto a package when it goes beyond the standard core areas... although all the naming is still completely confusing at this point. |
I agree this needs to be fixed, but I isn't clear to me what the best solution is. Without that I can't start of course :) Do you have examples of new packages regarding with dnx/rc3? |
Also confusing, the repository of Microsoft.extensions.Logging is called aspnet/Logging ;) |
Will do this in the near future |
Any idea how this should work in a .NET Core Console application? How do we get NB: the DI feature is removed in non-asp.Net: http://www.inversionofcontrol.co.uk/asp-net-core-1-0-dependency-injection-what-is-is-and-what-it-is-not-2/, the |
Got the solution for the console app: |
@304NotModified Sorry for late reply. I have another approach to start a console application to also use the dependency injection as in the asp.net core application. The program with the static main is only containing the application starting/configuration options and that is creating; from dependency injection, and calling the main-method.
|
I'm also trying to use this in non-asp.net-core console application but scared off by the asp.net core host dependencies. I'm currently using Serilog as an alternative solution, but I'd like to go back to NLog when this issue is solved. |
We have to do the following to remove the dependency to ASP.NET for this package
I could use some help on 1. |
working on this |
this has been released! https://www.nuget.org/packages/NLog.Extensions.Logging/1.0.0-rtm-beta1 ASP.NET Core users should also install NLog.Web.AspNetCore: https://www.nuget.org/packages/NLog.web.aspnetcore |
Move the extension method that need of
Microsoft.AspNet.Hosting
dependency to own assembly to not get all the extra dependencies into the library when using the package from ex class library.I'm using Microsoft.Extensions-package but running them from asp.net webforms application without dnx support.
The text was updated successfully, but these errors were encountered: