Rebuild EntLib: [Edit Enterprise Lib conf] does not shows the Conf console. Help!

Topics: Building and extending application blocks, Enterprise Library Core
Jul 7, 2008 at 10:55 AM
Edited Jul 7, 2008 at 10:57 AM
Hey guys,

I am novice to EntLib. And I've Customize the EntLib. I built the entire solution using BuildLibrary.bat and have copied the assemblies in [Installed dir]\Programfiles\Mic....EntLib..\bin folder using CopyAssembly.bat.

As I built the entlib with publickeytoken= null, I also modified the EntLibConf.exe and set the publickeytoken of all the references to null.

Now the thing is, I dont get the configuration console when I right-click and press the EditEnterpriseLib..Configuration.

What can I do?

Looking forward to hearing from you guys.

Thanks
dj
Jul 7, 2008 at 4:39 PM
Hi,

You don't need to replace the binaries in the install folder, and doing that can mess things up.

The configuration tool in VS works with "configuration sets", which can be seen as plug ins for the configuration tool. These configuration sets are defined in the registry under the HKLM and HKCU hives, and you can specify for a solution which configuration set you want to use. In order for the tool to work, all configuration sets share a binary dependency on Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, which is not part of the EntLib source tree.

Each configuration set entry in the registry looks like this:

[HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0\Packages\{488366a4-630c-4a0e-a6a2-b019cee13bea}\ConfigurationEditor\EntLib4Src]
"ConfigurationUIAssemblyPath"="C:\\EntLib4Src\\App Blocks\\bin\\Microsoft.Practices.EnterpriseLibrary.Configuration.Design.UI.dll"
"ConfigurationUIAdapterClass"="Microsoft.Practices.EnterpriseLibrary.Configuration.Design.UI.SingleHierarchyConfigurationUIHostAdapter"
"ConfigurationUIPluginDirectory"="C:\\EntLib4Src\\App Blocks\\bin"


Where the key name EntLib4Src is the configuration set name and the entries specify settings required to load the plug in. In particular, the class in ConfigurationUIAdapterClass must implement the ISingleHierarchyConfigurationUIHostAdapter from the Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapter assembly.

So, in order for your rebuilt binaries to work with the configuration tool you should:
  • Revert the binaries from the install folder to the original MS-signed versions
  • Copy your rebuilt binaries to some location of your choice
  • Define a new configuration set. There are details on how to do it in this post from Tom Hollander (just use the VS 2008 registry keys instead). Also, you get a default configuration set when you extract a new working copy.
  • Either update your solution to use the new configuration set (by setting the EnterpriseLibraryConfigurationSet solution property) or change the machine's default by updating the defaultConfigurationSet value under [HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0\Packages\{488366a4-630c-4a0e-a6a2-b019cee13bea}\ConfigurationEditor] to the name of your configuration set.

 

 Fernando


dotnetjockey wrote:
Hey guys,

I am novice to EntLib. And I've Customize the EntLib. I built the entire solution using BuildLibrary.bat and have copied the assemblies in [Installed dir]\Programfiles\Mic....EntLib..\bin folder using CopyAssembly.bat.

As I built the entlib with publickeytoken= null, I also modified the EntLibConf.exe and set the publickeytoken of all the references to null.

Now the thing is, I dont get the configuration console when I right-click and press the EditEnterpriseLib..Configuration.

What can I do?

Looking forward to hearing from you guys.

Thanks
dj


Jul 8, 2008 at 3:36 AM

Thanks Man

Great help.
I'll try that and let you know what happens.


fsimonazzi wrote:
Hi,

You don't need to replace the binaries in the install folder, and doing that can mess things up.

The configuration tool in VS works with "configuration sets", which can be seen as plug ins for the configuration tool. These configuration sets are defined in the registry under the HKLM and HKCU hives, and you can specify for a solution which configuration set you want to use. In order for the tool to work, all configuration sets share a binary dependency on Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, which is not part of the EntLib source tree.

Each configuration set entry in the registry looks like this:

[HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0\Packages\{488366a4-630c-4a0e-a6a2-b019cee13bea}\ConfigurationEditor\EntLib4Src]
"ConfigurationUIAssemblyPath"="C:\\EntLib4Src\\App Blocks\\bin\\Microsoft.Practices.EnterpriseLibrary.Configuration.Design.UI.dll"
"ConfigurationUIAdapterClass"="Microsoft.Practices.EnterpriseLibrary.Configuration.Design.UI.SingleHierarchyConfigurationUIHostAdapter"
"ConfigurationUIPluginDirectory"="C:\\EntLib4Src\\App Blocks\\bin"


Where the key name EntLib4Src is the configuration set name and the entries specify settings required to load the plug in. In particular, the class in ConfigurationUIAdapterClass must implement the ISingleHierarchyConfigurationUIHostAdapter from the Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapter assembly.

So, in order for your rebuilt binaries to work with the configuration tool you should:
  • Revert the binaries from the install folder to the original MS-signed versions
  • Copy your rebuilt binaries to some location of your choice
  • Define a new configuration set. There are details on how to do it in this post from Tom Hollander (just use the VS 2008 registry keys instead). Also, you get a default configuration set when you extract a new working copy.
  • Either update your solution to use the new configuration set (by setting the EnterpriseLibraryConfigurationSet solution property) or change the machine's default by updating the defaultConfigurationSet value under [HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0\Packages\{488366a4-630c-4a0e-a6a2-b019cee13bea}\ConfigurationEditor] to the name of your configuration set.

 

 Fernando


dotnetjockey wrote:
Hey guys,

I am novice to EntLib. And I've Customize the EntLib. I built the entire solution using BuildLibrary.bat and have copied the assemblies in [Installed dir]\Programfiles\Mic....EntLib..\bin folder using CopyAssembly.bat.

As I built the entlib with publickeytoken= null, I also modified the EntLibConf.exe and set the publickeytoken of all the references to null.

Now the thing is, I dont get the configuration console when I right-click and press the EditEnterpriseLib..Configuration.

What can I do?

Looking forward to hearing from you guys.

Thanks
dj





Jul 8, 2008 at 10:16 AM

Its Great!

Fernando your solution worked a treat.

I wonder! Simple things can be impossible to do when one don't knows to do that.

Thanks again!!!

dj (Tarique)

Jul 8, 2008 at 11:52 AM
Hi,

I'm glad it worked for you. This has been usually hard to discover, so there's a problem to be solved there.

Fernando


dotnetjockey wrote:

Its Great!

Fernando your solution worked a treat.

I wonder! Simple things can be impossible to do when one don't knows to do that.

Thanks again!!!

dj (Tarique)