Replies: 1 comment 1 reply
-
|
OMG, you are absolutely right. I made a such a beginner's mistake. I remember that I used Microsoft.Extensions.Logging because of EventId and obviously overlooked that it is already declared in Microsoft.Extensions.Logging.Abstractions. We release a new bug fix update early in January with this issue is fixed. Thanks |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was wondering if it might be possible to move logging to a model, where PDFSharp depends on "Microsoft.Extensions.Logging.Abstractions" and the application brings in the "Microsoft.Extensions.Logging" dependency?
In my application we use a different logging library, that also implements Microsoft.Extensions.Logging.Abstractions. This seems to be a somewhat common practice.
Basically, the Abstractions package brings in all the Interfaces, but only a NullLogger implementation.
One nuance that might be important when evaluating this suggestion is that the namespaces and the packages do not line up perfectly. For example the Microsoft.Extensions.Logging.EventId struct is actually in the Abstractions package, even though the namespace suggests otherwise.
(I am talking mostly about the base PDFsharp package)
Update: I tried this, I changed the PdfSharp.Shared and PdfSharp.System projects to depend on the Abstractions package locally. With this change in place, the PdfSharp project still builds without error.
This strongly indicates to me that this change would be possible (even without changing the API).
Beta Was this translation helpful? Give feedback.
All reactions