Enterprise Library Configuration and Visual Studio


Standardizing on Enterprise Library

- April 20, 2015

Rest of the Story:

If your company decides to sign their Enterprise Library files with their public and private keys the default Ent LIb Configuration tool that is integrated with Visual Studio will not by default use the newly signed assemblies.  The following is a brief description on how to update your system so that the appropriate assemblies are used.
1.) Add the following registry key and values to the registry

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Packages\{488366a4-630c-4a0e-a6a2-b019cee13bea}\{ConfigurationSets} You need to add an additional configuration set.  By default you will see the Microsoft Signed set.  Below is how the new key will be set up.   In the following example you will need to change the paths for ConfigurationUIAssemblyPath and ConfigurationUIPluginDirectory to point to where your company signed assemblies are located.
{Your Set Name}      (Default) REG_SZ (Value not set)      (ConfigurationUIAdapterClass) REG_SZ Microsoft.Practices.EnterpriseLibrary.Configuration.Design.UI.SingleHierarchyConfigurationUIHostAdapter      (ConfigurationUIAssemblyPath) REG_SZ C:\CompanySigned\GAC\EnterpriseLibrary\Microsoft.Practices.EnterpriseLibrary.Configuration.Design.UI.dll      (ConfigurationUIPluginDirectory) REG_SZ C:\CompanySigned\GAC\EnterpriseLibrary
2.) The second step to ensure that the Visual Studio Enterprise Library configuration tool uses the newly signed assemblies is to open the Visual Studio solution that you are working with.  Select the solution name and look at the properties.  After you make the above registry entry in 1 above be sure to close/open VS.NET.  There is a property called EnterpriseLibraryConfigurationSet.  If step 1 was successful you should see in the selection list for ConfigurationSet the new entry {Your Set Name}.  Great.   In figuring this out I used as reference the following internet resources http://entlib.codeplex.com/Thread/View.aspx?ThreadId=30986 http://blogs.msdn.com/b/tomholl/archive/2007/04/19/avoiding-configuration-pitfalls-with-incompatible-copies-of-enterprise-library.aspx