2
votes

I'm getting a silent error when trying to create my Log4NetAppender, which stops the logging from working.

Could not load type 'Microsoft.ApplicationInsights.TelemetryConfiguration' from assembly 'Microsoft.ApplicationInsights, Version=1.1.0.1899, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
at Microsoft.ApplicationInsights.Tracing.Tracer..ctor(String instrumentationKey)
at Microsoft.ApplicationInsights.Log4NetAppender.ApplicationInsightsAppender.ActivateOptions()

at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(XmlElement appenderElement)

From what I can see, the log provider is trying to create the class Microsoft.ApplicationInsights.TelemetryConfiguration but this is the wrong namespace and the class actually exists in Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.

We are using the following libraries

Microsoft.ApplicationInsights - 1.1.0.1899

Microsoft.ApplicationInsights.Log4NetAppender - 0.10.0.0

They are both the latest versions, so I'm not sure why they aren't working together.

1

1 Answers

2
votes

Fixed it - Just upgraded to the latest Microsoft.ApplicationInsights.Log4NetAppender stable pre-release 1.1.0