Ent. Lib 5.0 Error - RollingFlatFileTraceListenerData

Topics: Logging Application Block
Apr 22, 2010 at 7:50 PM

I am attempting to update my 3.5 WPF application to use Enterprise Library 5.0 with .NET 4.  I am running into the following error:

The type 'Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' cannot be resolved.

Here is that section of my config file:

<add fileName="trace.log" header="----------------------------------------" footer="----------------------------------------" formatter="Text Formatter"
           listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
           traceOutputOptions="None" filter="All"
           type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
           rollInterval="Midnight" rollFileExistsBehavior="Increment" name="RollingFlatFile TraceListener"/>

Anyone have any insights?

Tks.

Apr 22, 2010 at 11:45 PM

Are you editing your config in xml editor?  coz the type attribute should refer to RollingFlatFileTraceListener, not the RollingFlatFileTraceListenerData.

 type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

should be

 type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com