Microsoft.Practices.EnterpriseLibrary.Common.Configuration classes

Topics: Building and extending application blocks, Data Access Application Block
Aug 3, 2012 at 6:14 PM

Intellisense only shows thew following classes:

DatabaseProviderExtensions

DataConfigurationSourceBuilderExtensions

 

I want to utilize the EnterpriseLibraryContainer which is suppose to be in the namespace.

 

Thanks

Mike

Aug 3, 2012 at 6:53 PM
Edited Aug 3, 2012 at 6:54 PM

You need to reference the Assembly Microsoft.Practices.EnterpriseLibrary.Common.dll.  And add a using/imports for Microsoft.Practices.EnterpriseLibrary.Common.Configuration (if you don't want to fully qualify the type).

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com 

Aug 3, 2012 at 7:00 PM

Also, I notice when I add reference to Enterprise Library Data Access Application Block is is against runtime 2.0.50727 and not 4.0. Not sure if this is the problem or not. This is my first time using the Microsoft Application blocks. I downloaded and installed the Enterprise Library 5.0. Does anyone have any idea why the namespace does not contain the EnterpriseLibraryContainer class??

 

Mike

Aug 3, 2012 at 7:04 PM

Randy 

Thanks for the response, but that specific reference cannot be found in the .NET tab of 'Add Reference'.  I uninstalled and re-installed but that reference is not in the .Net list of references. There seem to be many other Enterprise Library references, but not that particular one.

 

Mike

Aug 3, 2012 at 7:10 PM

OK - I didn't realize I needed to browse to the particular folder containing that DLL. I located it and now I have access to the EnterpriseLibraryContainer class.  So my question is -  what determines which dlls get placed in the GAC vs the ones that are only available on the filesystem when it comes to the Enterprise library?

 

Thanks again.

Mike

 

Aug 3, 2012 at 7:31 PM
Edited Aug 3, 2012 at 7:40 PM

Actually, Enterprise Library 5 is not installed in the GAC by default.  The search path for the Add Reference .NET tab is determined via registry keys.  For a 64 bit OS this would be: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx.  See How to: Add or Remove References in Visual Studio for more info.

Also, the assembly Microsoft.Practices.EnterpriseLibrary.Common.dll should appear as "Enterprise Library Shared Library".

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com 

Aug 3, 2012 at 7:43 PM

I did not know that - thanks for the reference!

 

Mike