-
Notifications
You must be signed in to change notification settings - Fork 153
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
Missing Microsoft.Extensions.Configuration.Abstractions.dll in .Net Framework 4.8 #586
Comments
I'm guessing you have become used to .NET Core development, where transitive-nuget-dependencies just works, and no longer getting bitten by strong-version-assembly-issues. For .NET Framework projects then transitive-nuget-dependencies can work automatically if changing to the new csproj-format where nuget-packages are included with
For any strong-version-assembly-issues, then your only friend is the binding-redirections. See also https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/redirect-assembly-versions and https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/how-to-enable-and-disable-automatic-binding-redirection |
My projects are already using the PackageReferences strategy, so that's not the problem. The net461 should also have Microsoft.Extensions.Configuration.Abstractions as a PackageReference right?
|
Microsoft.Extensions.Logging-nuget-package depends on Microsoft.Extensions.Logging.Abstractions |
Microsoft.Extensions.Configuration.Abstractions is not the same as Microsoft.Extensions.Logging.Abstractions |
Microsoft.Extensions.Logging-nuget-package depends on Microsoft.Extensions.Configuration.Binder that depends on Microsoft.Extensions.Configuration.Abstractions But I guess Microsoft have changed it so newer versions of |
Created #590 to reduce the pain from the change in |
NLog 5.0 has now been released |
Type: Bug
NLog version: 4.7.15
NLog.Extensions.Logging version: 1.4.7
NLog.Web.AspNetCore version: (not used)
Platform: .Net Framework 4.8
Current NLog config:
What is the current result?
An exception when calling .AddNLog() for an ILoggingBuilder, because the Microsoft.Extensions.Configuration.Abstractions.dll is missing.
What is the expected result?
I expected the Microsoft.Extensions.Configuration.Abstractions.dll to be included when installing NLog.Extensions.Logging in a .Net Framework 4.8 project.
Did you checked the Internal log?
Not relevant I think.
Please post full exception details (message, stacktrace, inner exceptions)
Are there any work arrounds? yes
Manually installing the Microsoft.Extensions.Configuration.Abstractions.dll (5.0.0) package worked.
However, I really don't like this workaround, because I'm shipping my code in question as a NuGet package; anyone installing the NuGet package would have to manually install this missing dll.
Is there a version in which it did worked?
Not that I know of.
Can you help us by writing a unit test?
No, but I can show you what I'm doing, which is attaching NLog to a SignalR client:
You can simply test it by:
The text was updated successfully, but these errors were encountered: