Hi,

Roy said in some thread people had reported problems with the ADO.NET
appender when running on .NET 4.0.

I managed to get to the point where NAnt at least tries to run the unit
tests on 4.0 and this is what I see:

Unhandled Exception: System.TypeLoadException: Inheritance security rules 
violated while overriding member: 
'log4net.Core.LoggingEvent.GetObjectData(System.Runtime.Serialization.SerializationInfo,
 System.Runtime.Serialization.StreamingContext)'. Security accessibility of the 
overriding method must match the security accessibility of the method being 
overriden.
   at log4net.Appender.BufferingAppenderSkeleton.Flush(Boolean flushLossyBuffer)

   at log4net.Appender.BufferingAppenderSkeleton.OnClose() in 
c:\OSS\log4net\src\Appender\BufferingAppenderSkeleton.cs:line 411
   at log4net.Appender.AdoNetAppender.OnClose() in 
c:\OSS\log4net\src\Appender\AdoNetAppender.cs:line 433
   at log4net.Appender.AppenderSkeleton.Close() in 
c:\OSS\log4net\src\Appender\AppenderSkeleton.cs:line 243
   at log4net.Appender.AppenderSkeleton.Finalize() in 
c:\OSS\log4net\src\Appender\AppenderSkeleton.cs:line 83

which may or may not be related.

I do not see this when I tell NAnt to use the .NET FX 2.0
(via Nant -t:net-2.0) - I "only" get the ten unit test failures I
already raised in JIRA.

Stefan

Reply via email to