apache/logging-log4net

Support aot?

YahuiWong opened this issue · 6 comments

I publish my dotnet 8 project by aot mode ,
After that the soft can`t working . and print the err msg

log4net:ERROR Exception while reading ConfigurationSettings. Check your .config file is well formed XML.
System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize
 ---> System.MissingMethodException: No parameterless constructor defined for type 'System.Configuration.ClientConfigurationHost'.
   at System.ActivatorImplementation.CreateInstance(Type, Boolean) + 0x119
   at System.Configuration.Internal.ConfigSystem.System.Configuration.Internal.IConfigSystem.Init(Type, Object[]) + 0x43
   at System.Configuration.ClientConfigurationSystem..ctor() + 0x47
   at System.Configuration.ConfigurationManager.EnsureConfigurationSystem() + 0x56
   --- End of inner exception stack trace ---
   at System.Configuration.ConfigurationManager.PrepareConfigSystem() + 0x35
   at System.Configuration.ConfigurationManager.GetSection(String) + 0x18
   at System.Configuration.ConfigurationManager.get_AppSettings() + 0x11
   at log4net.Util.SystemInfo.GetAppSetting(String) + 0x21

@YahuiWong please See #142
@FreeAndNil
I do not know,Is #142 have a solution?

@YahuiWong yes, see my comments and #143

@YahuiWong please reopen when you have feedback

I have no idea about how to solve it.
Is that I reference log4net need use dll files not nuget?
@FreeAndNil

I have no idea about how to solve it.
Is that I reference log4net need use dll files not nuget?
@FreeAndNil

@YahuiWong yes, you need to build the dll from the sources in the refrenced branch or use these binaries:
netstandard2.0.zip