Invalid TraceListenerData type in configuration 'listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging"'.

Topics: Logging Application Block
Sep 2, 2014 at 5:10 AM
Hi,

I am getting the below error while logging the trace details.

Invalid TraceListenerData type in configuration 'listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging"'.


My logging configuration is as follows:

<configSections>
<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
</configSections>


I have the EntLib Logging dll deployed in GAC (Ver. 4.0) @ location C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Practices.EnterpriseLibrary.Logging\v4.0_6.0.0.0__31bf3856ad364e35. But, for some reason .NET Runtime is not pull this dll from GAC.

The exception goes away when I copy the EntLib Logging dll to the dir where the executable is actually located.

Kindly, let me know why the .NET Runtime is not able to Load thid assembly from GAC?

As per my understanding if the CLR doesnt finds the required dlls in the base directory (the one where the executable is actually located it will look for it into GAC)

But for some reason this is not happening. Kinldy, let me know what is going wrong?
Sep 2, 2014 at 12:19 PM
Did you also install the Microsoft.Practices.EnterpriseLibrary.Common.dll assembly in the GAC? It is a required dependency for Logging.

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to