Prism.Logging.Serilog not working with .net 6, Does Serilog no longer work with prism .net 6 #2732
Replies: 1 comment
-
It's possible, but you need a few additional packages to get it working rather than just the premade package. In your App.xaml.cs you need to add the following
I'm not sure on the exact additional packages you need, so here's a list of what I think was involved. It may be missing some, or have some extra you don't need however. Prism.Microsoft.DependencyInjection.Extensions if you want to load your settings form a json file you'll also likely need to add the following
and you'll need to add a ReadFrom.ConfigurationFile(Configuration) line to your logger setup code just above CreateLogger(); I've got this working in a current WPF application, you might need a few tweaks but it should work for you. --edit-- The above all assumes Unity, however switching from the Unity container to the DryIOC version should only be a one line change IIRC. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I need to user Serilog as the logger in a .Net 6 application using Visual Studio 2022.
It seems the Prism.Logging.Serilog does not work in.
It does not install through Nuget Packages, and just pasting the reference in the project file the package shows up as an error.
Is there a way to get Serilog registered in using PRISIM in .Net 6 another way?
I guess the Prism.Logging.Serilog was once useful but has become obsolete
Beta Was this translation helpful? Give feedback.
All reactions