Skip to content

log4net in MAUI application #153

Closed
Closed
@TheSundayDev

Description

@TheSundayDev

Hi all,
I'm migrating from xamarin form to MAUI (ios and android) and one library has log4net as dependency.
I have the exception below.
How can I solve it?
thanks a lot

[DOTNET] log4net:ERROR Exception while reading ConfigurationSettings. Check your .config file is well formed XML.
[0:] log4net:ERROR Exception while reading ConfigurationSettings. Check your .config file is well formed XML.
[DOTNET] System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize
[DOTNET] ---> System.PlatformNotSupportedException: Operation is not supported on this platform.
[DOTNET] at System.Configuration.ClientConfigPaths..ctor(String exePath, Boolean includeUserConfig)
[DOTNET] at System.Configuration.ClientConfigPaths.GetPaths(String exePath, Boolean includeUserConfig)
[DOTNET] at System.Configuration.ClientConfigurationHost.get_ConfigPaths()
[DOTNET] at System.Configuration.ClientConfigurationHost.GetStreamName(String configPath)
[DOTNET] at System.Configuration.ClientConfigurationHost.get_IsAppConfigHttp()
[DOTNET] at System.Configuration.Internal.DelegatingConfigHost.get_IsAppConfigHttp()
[DOTNET] at System.Configuration.ClientConfigurationSystem..ctor()
[DOTNET] at System.Configuration.ConfigurationManager.EnsureConfigurationSystem()
[DOTNET] --- End of inner exception stack trace ---
[DOTNET] at System.Configuration.ConfigurationManager.PrepareConfigSystem()
[DOTNET] at System.Configuration.ConfigurationManager.GetSection(String sectionName)
[DOTNET] at System.Configuration.ConfigurationManager.get_AppSettings()
[DOTNET] at log4net.Util.SystemInfo.GetAppSetting(String key)
[0:] System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize
---> System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Configuration.ClientConfigPaths..ctor(String exePath, Boolean includeUserConfig)
at System.Configuration.ClientConfigPaths.GetPaths(String exePath, Boolean includeUserConfig)
at System.Configuration.ClientConfigurationHost.get_ConfigPaths()
at System.Configuration.ClientConfigurationHost.GetStreamName(String configPath)
at System.Configuration.ClientConfigurationHost.get_IsAppConfigHttp()
at System.Configuration.Internal.DelegatingConfigHost.get_IsAppConfigHttp()
at System.Configuration.ClientConfigurationSystem..ctor()
at System.Configuration.ConfigurationManager.EnsureConfigurationSystem()
--- End of inner exception stack trace ---
at System.Configuration.ConfigurationManager.PrepareConfigSystem()
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.get_AppSettings()
at log4net.Util.SystemInfo.GetAppSetting(String key)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions