-
-
Notifications
You must be signed in to change notification settings - Fork 340
Open
Description
We have a Windows project that we've set to use PublishAOT
When calling:
LogManager.GetLogger(typeof(SomeType));We get this exception:
System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Reflection.Assembly.GetCallingAssembly() + 0x4a
at log4net.LogManager.GetLogger(Type) + 0xe
As it happens, GetLogger calls Assembly.GetCallingAssembly(); which is not supported in AOT compiled binaries.
solutions:
I would add Net6.0 / Net8.0 target platforms, and use conditionals to use something other than GetCallingAssembly();
Also, I've seen #142 and #143 , unfortunately PublishAOT requires Trimming to be set and it cannot be opted out.
Metadata
Metadata
Assignees
Labels
No labels