我试图将log4net实现到我的项目,该项目也具有Settings.Default参数,但是在第一次调用任何系统Settings.Default参数时收到“配置系统初始化失败”错误。你们可以看看吗?谢谢!
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Order_Take_3._0.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
<sectionGroup name="SectionGroupLogger">
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</sectionGroup>
</configSections>
<log4net>
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<conversationPattern value="%date{ABSOLUTE} [%thread] %level - %message%newline%exception" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<apender-ref ref="ConsoleAppender" />
</root>
</log4net>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup>
<userSettings>
<Order_Take_3._0.Properties.Settings>
<setting name="AFEWDUS" serializeAs="String">
<value>681124</value>
</setting>
<setting name="AFEKMTUS" serializeAs="String">
<value>681625</value>
</setting>
<setting name="cloudReminderCountDown" serializeAs="String">
<value>21</value>
</setting>
<setting name="orderConfirmationCheckCountDown" serializeAs="String">
<value>3</value>
</setting>
<setting name="AFEKMTCa" serializeAs="String">
<value>0</value>
</setting>
<setting name="AFEWDCa" serializeAs="String">
<value>0</value>
</setting>
</Order_Take_3._0.Properties.Settings>
</userSettings>
</configuration>