Build Error : Reference to Microsoft.Practices.EnterpriseLibrary.Logging.Database

Topics: Logging Application Block
Jun 4, 2010 at 3:06 PM

I got a build error while trying to reference 


Error 8 The type or namespace name 'Database' does not exist in the namespace 'Microsoft.Practices.EnterpriseLibrary.Logging' (are you missing an assembly reference?) 

I did the following as per the thread

Type t = typeof(Microsoft.Practices.EnterpriseLibrary.Logging.Database.FormattedDatabaseTraceListener);

What could be possible solution to remove build error?















Jun 7, 2010 at 1:00 AM
Edited Jun 7, 2010 at 1:03 AM

This is a known issue in version 5.0.   If you're targeting .NET Client Profile, you need to change it to target the full .NET framework.  Right click on project, select Properties, select .NET Framework 4.0 in the Target framework combo box.

For more info on this issue, you can refer to this thread.


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.