Error: Unable to initialize the Enterprise Library Configuration Editor.

Topics: General discussion
Oct 30, 2008 at 4:52 PM

When I open up any of the Quick Starts and double-click on the app.config file, I see the following error:

Error: Unable to initialize the Enterprise Library Configuration Editor.

C:\EntLib41Src\bin\Microsoft.Practices.EnterpriseLibrary.Configuration.Design.UI.dll or one of its dependencies.  The system cannot find the file specified.

The intaller for Enterprise Library 4.1 fails to create directory C:\EntLib41Src\bin\, much less put any DLL's into it.

Any suggested "quick fix" for this issue until a patched installer can be created?

Oct 31, 2008 at 2:27 AM

You can try running the Enterprise Library Source Code Installer, Usually on this path:

Start > Programs > Microsoft Patterns and Practices > Enterprise Library 4.1 - October 2008 > Enterprise Library Source Code Installer

NOTE : In the Extract Working Copy dialog, make sure that all the feature are included in the install (has no "X" mark).

Hope this helps.

Oct 31, 2008 at 11:37 AM
I never rebuild the Enterprise Library.  I have a strict policy of using it only in an out-of-the-box manner.  I find it odd that you cannot use Enterprise Library Configuration Tool unless you rebuild the library.  To me, this is poor design, poor planningAll features of Enterprise Library should work using the out-of-the-box binaries.
Nov 2, 2008 at 7:25 AM
The quickstarts should work out of the box. There is NO requirement to recompile entlib to get the config tool to work.

You never explicitly state this, but I'm guessing you're using the integrated VS config tool, not the standalone one, right? If so, could you please open a quickstart that's giving you trouble, select the root node in the solution explorer, and then look in the Properties toolbar (NOT the right-click "Properties" window). In the properties should be an entry for EnterpriseLibraryConfigurationSet. Pop down the combo box, select "Microsoft Signed" and you should be good to go.

If that doesn't work, please let me know.

For more information on what's going on, please see this post from Tom Hollander.
Nov 3, 2008 at 2:18 PM
  1. Yes, I'm using Visual Studio 2008 to view/edit the app.config files in the various quick starts.
  2. Manually changing the EnterpriseLibraryConfigurationSet from the installation default of EntLib4Src to Microsoft Signed provides a work-around.
  3. Alternatively, you can create a bin directory underneath C:\EntLib4Src and copy the 84 DLL/XML files from C:\Program Files\Microsoft Enterprise Library 4.1 - October 2008\Bin to that directory, which eliminates the need to manually change the EnterpriseLibraryConfigurationSet value of every quick start solution.
  4. I'll see if I can write a PowerShell script that will search through each .sln file and make the necessary changes so that they all read like the following:

GlobalSection(ExtensibilityGlobals) = postSolution

    SelectedEnterpriseLibraryConfigurationSet = Microsoft Signed


Is there any chance in a future install that we can choose Microsoft Signed as the default if we choose not to rebuild the library?

Nov 7, 2008 at 2:33 PM
Switching the configuration set would let you modify the configuration files, but that wouldn't help when running them.

The QuickStarts reference the source code projects, not the signed binaries, so the type references in their configuration files must have either partial names or the full unsigned assembly names. Out of the box the config files have partial names so you can open them with a configuration editor expecting the signed binaries, but once you save the file the full assembly names will be written to the file and then the types will not match the actual assemblies that are available for the application, causing a "The located assembly's manifest definition does not match the assembly reference" exception.

The appropriate way to open these configuration files is to build the binaries from the source code, which is done by default when installing the source code.