Description
I have a problem with a project using version 2.0.7 (from Nuget) compiled on a machine running windows 7 with VS2015 and .net 4.5, targeting framework 4.0 to get it to run on a windows xp machine:
I cannot use a RemoteSystlogAppender and when log4net debug is activated, I get this in the log:
log4net:ERROR [RemoteSyslogAppender] ErrorCode: WriteFailure. Unable to send logging event to remote syslog 172.27.48.80 on port 514. System.TypeLoadException: Could not load type 'System.Security.Claims.ClaimsIdentity' from assembly 'mscorlib, Version=4 .0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. at log4net.Core.LoggingEvent.get_UserName() at log4net.Core.LoggingEvent.CreateCompositeProperties() at log4net.Core.LoggingEvent.LookupProperty(String key) at log4net.Layout.Pattern.PropertyPatternConverter.Convert(TextWriter writer, LoggingEvent loggingEvent) at log4net.Layout.Pattern.PatternLayoutConverter.Convert(TextWriter writer, Object state) at log4net.Util.PatternConverter.Format(TextWriter writer, Object state) at log4net.Layout.PatternLayout.Format(TextWriter writer, LoggingEvent loggingEvent) at log4net.Layout.LayoutSkeleton.Format(LoggingEvent loggingEvent) at log4net.Appender.RemoteSyslogAppender.Append(LoggingEvent loggingEvent).
After some googling, seems related to:
http://stackoverflow.com/questions/13748055/could-not-load-type-system-runtime-compilerservices-extensionattribute-from-as
Is log4net merged using ILMerge ? Could this be the cause ?