# Sunday, May 02, 2010

The new Enterprise Library 5.0 was launched a few days before and I decided to use this new version in my projects. One of the main application block I'm using is the Logging Application Block.

I went to use it in a WCF Service Library into Visual Studio 2010. Everything was fine until I decided to use a Database Trace Listener. Of course, I referenced the Microsoft.Practices.EnterpriseLibrary.Logging.Database in my project. But it always failed to run with this message:

"Invalid TraceListenerData type in configuration 'listenerDataType=\"Microsoft.Practices.EnterpriseLibrary.Logging.Database.Configuration.FormattedDatabaseTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging.Database, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\"'."

Finally, I found that you need to work with the .NET 4.0 Full Framework and not only the Client Profile. Some assemblies are needed by the Database Trace Listener that are not present in the Client Profile (to learn more about the differences between the Full Framework and the Client profile, go here).

So, just target your project to the .NET Framework 4 and everything will be fine.

Friday, May 07, 2010 8:11:10 AM (Romance Daylight Time, UTC+02:00)
You saved my day, thank you for this information!
Tim
Wednesday, June 09, 2010 10:50:56 PM (Romance Daylight Time, UTC+02:00)
Perfect answer.
Thank you very much.
All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview