logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: Log4Net failed in .net 3.5 Framework
Date Sat, 21 Jun 2008 20:42:30 GMT
If the exception message mentioned your app.config being malform perhaps you should use a well
formed app.config. This is incorrect:

   <appSettings>  
    <Hello>
       .....
       .....
    </Hello> 
  </appSettings>

AppSettings can only contain <add /> nodes:

 <appSettings>
  <add key="log4net.Internal.Debug" value="true" />
 </appSettings>

Since new version of the Framework are backwards compatible with previous versions, the latest
version of the log4net is compatible with version 3.5 of the Framework.

----- Original Message ----
From: CheeHong <cheehongh@hotmail.com>
To: log4net-dev@logging.apache.org
Sent: Saturday, June 21, 2008 5:49:19 AM
Subject: Log4Net failed in .net 3.5 Framework


Hello,

I had jus migrated my VS2003 project to VS2008 Evaluation version. I found
out that my log4net is giving me an error in which previously it didn't
complain.

Function I called is LogManager.GetLogger(name)

It gives me "TypeInitializationException was unhandled" error, with the
inner exception as "The type initializer for 'log4net.helpers.LogLog' threw
an exception". Go in further it mention about my app.config file is having
unrecognised element.

My app.config has the following structure:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>  
    <Hello>
       .....
       .....
    </Hello> 
  </appSettings>
  </configuration>

It is complaining about <Hello> being the unrecognized element. But I am
able to use log4net in VS2003 without any errors. Could it be due to the
incompatibility of using log4net on VS2008 ?

Is there a log4net version for .net framework 3.5 ? 

Can anyone help me on this, any suggestions are welcomed.

Thanks in advance.

Regards,
Chee Hong
-- 
View this message in context: http://www.nabble.com/Log4Net-failed-in-.net-3.5-Framework-tp18042667p18042667.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.

Mime
View raw message