-
Notifications
You must be signed in to change notification settings - Fork 165
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
.NET Core 3.0 with IHostEnvironment #350
Comments
Thanks for the heads up! Could you please help us with a PR? |
@jasonycw Just curious. Which version of NetStandard supports this new IHostEnvironment ? |
Good question, I think 2.1: https://github.com/dotnet/standard/blob/master/docs/versions.md |
So NetStandard2.1 with dependency on 3.0.0 preview-package: https://www.nuget.org/packages/Microsoft.Extensions.Hosting.Abstractions/ ? When a single platform depends on a preview-package, then the entire package also becomes a preview-package. Not sure we are going to have NLog.Extension.Logging in preview-stage until NetCore3 is fully ready. Or am I missing something? |
Yes, I think it makes sense to merge of .net core issue final, or maybe indeed a preview package (but not from master then). |
Yes master (or dev) would not be a good place for preview-features. Since we like to make changes and releases while waiting for NetCore3 to complete. But then the door to merge-hell suddenly opens up. And explaining why feature in one branch is not in latest netcore3-branch-preview-release (Happy memories from Nlog 5 forever branch). |
True, confusing, but it did work ;) Anyway, a PR and a PR package (from AppVeyor) sounds the best for me. |
Please add the requested info, so we could help you better! (This issue will be closed in 7 days) |
bump @jasonycw |
It looks like |
I guess we need to make an extension on IWebHostEnvironment then For now you could assign |
@mareklinka Just curious why do you need extension-methods for IHostEnvironment-interface ? Why not just use the IHostBuilder as recommended by all NetCore3 samples? (NLog already includes a |
I don't think we necessarily need the extension method. I was just migrating our existing code base and the project was using the |
@mareklinka Think the correct approach for NLog.Extension.Logging and NLog.Web.AspNetCore is to obsolete all usage of |
Created #478 and NLog/NLog.Extensions.Logging#342 and #483 |
Fixed by those PRs :) |
In .NET Core 2.X we can use
IHostingEnvironment
to.ConfigureNLog(...)
which NLog.config file to be used.But with .NET Core 3.0,
IHostingEnvironment
will become obsoleted and will become be replaced byIHostEnvironment
eventually according to dotnet/aspnetcore#7749https://docs.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-2.2&tabs=visual-studio#hostbuilder-replaces-webhostbuilder
Any planing on when will NLog support .NET Core 3.0 ?
The text was updated successfully, but these errors were encountered: