Loading custom Assembly to Enterprise Library Configuration Console

Topics: Building and extending application blocks, Data Access Application Block, Enterprise Library Core, Exception Handling Application Block, Logging Application Block
Jan 7, 2011 at 9:06 PM

I wanted to change the main enterprise library namespace ( Microsoft.Practices.EnterpriseLibrary) to say MyNamespace and build Logging App Block.

The configuration tool is not letting me load the newly built assembly to specify fully qualified Type names (either from GAC or file)?

Any suggestion how to achieve this?


Jan 10, 2011 at 12:19 AM

You mean you have changed the namespaces by modifying the source code of the enterprise library and rebuilt it?  If yes then make sure that the new assemblies are in the same location where your configuration tool is.  What error are you encountering exactly?


Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.

Jan 10, 2011 at 4:09 PM
Edited Jan 10, 2011 at 4:20 PM

Thanks for your suggestion Sarah.

You are correct - I meant changing the namespace in the source code and rebuilding it.

Here is the error I'm getting for the exception handling section:

Error Loading Section exceptionHandling

Error message: Value cannot be null.

Parameter name: type

The other error for logging:

Error Loading Section loggingConfiguration

Error message: invalid TraceListnerData type in configuration 'listnerDataType="MyNamespace.Logging.Configuration.FormattedEventLogTraceListnerData, MyNamespace.Logging"'


Thanks again.

Sam T.




Jan 11, 2011 at 1:29 AM

Did you deploy the new assemblies to the same location where the configuration tool (EntLibConfig.exe) is?   Are you using as well a new build of the configuration tool or are you using the one from the installation folder integrated with Visual Studio?


Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.

Jan 11, 2011 at 3:35 PM
Edited Jan 11, 2011 at 10:20 PM

I've deployed the new assemblies to the location where the exe for the configuration tool is available.

I am not aware that the Enterprise Library source code contains also source for the configuration tool - not sure what you meant by "a new build of the configuration tool"

I didn't install the Enterprise Library from the msi package on my machine - I just have source for the library- i.e., no visual studio integration of the configuration tool.

The version of the configuration tool I'm running, I found it in Microsoft Enterprise Library 5.0 - Hands On Labs in Lib folder where all the enterprise library assemblies are for exercise purposes.

I'm using a windows server 2003 R2 64-bit machine.

I hope I gave you all the information you may need to help me with my issue.


Thanks a lot for following up.

Sam T.

Jan 12, 2011 at 1:15 AM

It does contain the source code for the configuration tool, its the Configuration.Console project under the Core -> Design solution folder.

not sure what you meant by "a new build of the configuration tool"

  - I meant to say a new EntLib.config.exe taken from the \EntLib50Src\Blocks\Configuration\Src\Console\obj\Debug as a result of rebuilding the source code.

Please try copying that and the other entlib assemblies to a new location (not on the hands on labs folder) and use that version of the configuration tool.


Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.

Jan 12, 2011 at 10:23 PM
Edited Jan 12, 2011 at 11:44 PM

Thanks for the lead Sarah.

As you suggested, I found the source for configuration tool and was able to compile all the necessary app blocks and projects (  Configuration.Console, Configuration.Design and Configuration.EnvironmentalOverride )

While making the modifications, I also changed the default namespaces prefix (Microsoft.Practices.EnterpriseLibrary) to MyNamespace for all the projects/app blocks.

A few assemblies such as Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapterV5, Microsoft.Practices.EnterpriseLibrary.Configuration.Design.HostAdapter, Microsoft.Practices.Unity, Microsoft.Practices.ServiceLocator ) are referenced as-is in the resulting projects as no source is available.

When I run the resulting EntLibConfig.exe file, it opens OK but Blocks and Wizards toolbar menu items are disabled. Also, it does not load configuration files when I try to open one.

From my debugging so far, I was able to find out the issue seems to be in EnsureCommands method of MenuCommandService class ( Microsoft.Practices.EnterpriseLibrary.Configuration.Design.ViewModel.Services.MenuCommandService ).

The LINQ query/statement is returning an empty list while the AssemblyLocator (this.assemblyLocator.Assemblies) contained number of assemblies ( these assemblies are a mix of the newly built ones with modified namespace and some EnterpriseLibrary ones). My assemblies are named strongly.


Thanks again for your help.


Sam T.