Reference Error

Topics: Data Access Application Block
Oct 31, 2010 at 3:11 AM


I am trying to use Data Access Application Block in a WPF desktop appliction with SQL Express (app is called Q4)   I think I have the right references including Microsoft.Practices.EnterpriseLibrary.Data

when I build I get this error

1 The referenced assembly "Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Data.OracleClient, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. Q4

Also, where I have referenced with using statement in classes



But get errors like:

8 The type or namespace name 'Data' does not exist in the namespace 'Microsoft.Practices.EnterpriseLibrary' (are you missing an assembly reference?) C:\Users\Burton\Documents\Visual Studio 2010\Projects\Q4\Q4\DataAccess\SessionMethods.cs 7 45 Q4

Thank you


Nov 1, 2010 at 11:06 PM
Edited Nov 1, 2010 at 11:45 PM

This is a known issue in EntLib 5.0.  You must target the full .NET Framework instead of the Client Profile (Right click on project, select Properties).  The Data Access Application Block has a dependency on System.Data.Oracle that has been removed from the client profile.


Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.