Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-548

Dependency missmatch .net 4.0 and 4.5 for System.Security.Claims.ClaimsIdentity

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.0.7
    • None
    • Core
    • Windows XP

    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 ?

      Attachments

        Activity

          People

            nachbarslumpi Dominik Psenner
            joseph.piron@gmail.com Joseph Piron
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: