Comments (15)
I just checked nuget and .net standard 2.0 is not listed as a supported framework.
Do yo know when this release will be available?
Thanks
from microsoft.extensions.logging.log4net.aspnetcore.
This package downgrade is because the "nearest" version to the project wins.
In this case your project (which also references log4net) references a lower version of the sockets than log4net does. Since the log4net reference is to the sockets is not "direct" it looses. The build detects this and warn about this.
I do not know exactly where the reference to the lower version of the socket package comes from (maybe from the default netcoreapp3.0 dependencies).
You can easily solve this by adding the higher version of the socket reference directly (in the same project as your log4net reference is added). Be aware that this might not solve all your version conflicts, so adding a meta package might be the better choice.
Try adding the latest (3.0.0) version of Microsoft.NETCore.Targets package.
Not sure if this is the only and best solution. But it feels much better than supressing the warning, which is supposed in many forums.
from microsoft.extensions.logging.log4net.aspnetcore.
Hello @tcz717 ,
Thank you very much by your kindly words.
Can you explain me something about the scenario that you are trying to solve with this nuget package?
For me, your question is similar to #3, and I think that the answer could be the same, but I want that, if you can, expose me the scenario in order to evaluate if the .net standard support is reasonable or not.
Thank you very much.
Regards
from microsoft.extensions.logging.log4net.aspnetcore.
Hi @huorswords
I am writing a RPC lib in .net standard 2.0 and its network part is based on DotNetty. DotNetty
has an internal logging system that supports Microsoft.Extensions.Logging.ILoggerFactory
interface, but my whole system uses log4net
to log. So I need an adapter to connect these two parts.
Thanks for your reply.
from microsoft.extensions.logging.log4net.aspnetcore.
Hello @tcz717,
After reviewing your request, and after checking some of the other Logging providers that also supports Microsoft.Extensions.Logging library, I have just included .NET Standard 2.0 as supported target framework of this project.
The nuget package will be available soon on nuget.org.
Thank you very much by your suggestion.
Regards.
from microsoft.extensions.logging.log4net.aspnetcore.
Hello @dgxhubbard,
Sorry but, on last version of the nuget package, .Net Standard 2.0 is one of the dependencies...
Where have you checked it? From VS? From nuget.org portal?
Thank you. Regards.
from microsoft.extensions.logging.log4net.aspnetcore.
I opened the manage nuget packages for solution click on browse and type in "log4net"
The last one listed is .net standard 1.3
from microsoft.extensions.logging.log4net.aspnetcore.
I see the problem. I searched here found log4net and thought this was log4net. I looked at the logging extension and there is a .net standard 2.0. Alas, I was looking for log4net thought.
Sorry about that.
from microsoft.extensions.logging.log4net.aspnetcore.
Oh! I see...
Cool, I have worried about it. :)
Anyway, thank you by your question.
from microsoft.extensions.logging.log4net.aspnetcore.
Hi, I just tried to add the log4net nuget for a netstandard2.0 library and had the same problem like dgxhubbard. What is excatly the name i have to search for in the nuget package manager of visual studio?
from microsoft.extensions.logging.log4net.aspnetcore.
Hello @JensFu ,
The official log4net nuget package (https://www.nuget.org/packages/log4net/) it is compatible with .NET Standard 1.3, so it should be compatible with any library created on .NET Standard 2.0.
At the other hand, the Microsoft.Extensions.Logging.Log4Net.AspNetCore package it is compatible with .NET Standard 2.0, and imports automatically the reference from log4net v.2.0.8 package.
Please, let me know any thought on this.
Thank you.
from microsoft.extensions.logging.log4net.aspnetcore.
Once you add the log4net reference to .NETStandard 2.0 project you get a lot of nu1605 warnings
I think there a need to make log4net .NETStandard 2.0 compatible
from microsoft.extensions.logging.log4net.aspnetcore.
Completely agree @petertsu , but unfortunately log4net is a "third-party" library on this project.
Maybe you can propose it as an enhancement on the log4net repo: https://github.com/apache/logging-log4net.
from microsoft.extensions.logging.log4net.aspnetcore.
Hi, I have been trying to deploy web API on Lambda AWS but every time I get this error in publishing on AWS.
error NU1605: Detected package downgrade: System.Net.Primitives from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
error NU1605: log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> runtime.unix.System.Net.Sockets 4.3.0 -> System.Net.Primitives (>= 4.3.0)
from microsoft.extensions.logging.log4net.aspnetcore.
Thanks a lot. Adding Microsoft.NETCore.Targets v3.0.0 nuget package in my project resolved the issue.
from microsoft.extensions.logging.log4net.aspnetcore.
Related Issues (20)
- Removing old log files HOT 1
- Missing Release Notes HOT 2
- Use it in a windows service console application HOT 1
- How to add SMTPAppender HOT 1
- Logging to different Log4Net loggers with dependency injection HOT 1
- Question about name HOT 3
- Thank you for the contribution.
- Does this work with .NET or .NET Core applications? HOT 1
- .net 7 HOT 2
- Need Example Logging Facade Use Outside of ASP HOT 2
- Enable internal debugging HOT 1
- Add .NET 8 support HOT 2
- Missing copyright notice in license
- Upgrading to net8.0 throws exception on startup. HOT 1
- Initialize without a config file HOT 1
- microsoft.extensions.logging.log4net.aspnetcore is missing NuGet package README file
- .NET8.0 XML Exception Problem HOT 4
- EventId Not Showing in Logs
- Logging latest scope value
- How do I configure log4net from in memory configuration xml element? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft.extensions.logging.log4net.aspnetcore.