using EntLib with .NET Framework 4

Topics: Data Access Application Block, General discussion
Mar 19, 2012 at 5:18 PM

My DLL that has 'Target framework' set to '.NET Framework 4' compiles.  It has a reference to Microsoft.Practices.EnterpriseLibrary.Data (Version 5.0.505.0), and I'm using (for the Oracle ODP.NET provider).

In a different project, I have a reference to this DLL.  Visual Studio 2010 SP1 gives warning (maybe should be an error):

Warning The referenced assembly "c:\tfs\blah\blah.dll" 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=4.0,Profile=Client"  Please remove references to assemblies not in the targeted framework or consider retargeting your project.

I don't have any references to System.Data.OracleClient, but Microsoft.Practices.EnterpriseLibrary.Data.xml file does.  Is there a 'clean' version of this file already available - without references to System.Data.OracleClient - that will allow for

Mar 19, 2012 at 7:42 PM

To use the Data Access Application Block (DAAB) you will need to target the full .NET Framework and not the .NET Framework Client Profile.  This is a known issue.  DAAB has a dependency on System.Data.Oracle which was removed from the Client Profile.

Randy Levy
Enterprise Library support engineer