Enterprise library configuration tool error

Topics: Enterprise Library Core, General discussion
Feb 25, 2007 at 7:55 PM

I opened the enterprise library solution and, i signed all the Enterprise library dll and put them in the GAC(i have january 2006 release), and now when i open the configuration tool and try to load web.config file, i get the following error:

Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=, Culture=neutral, PublicKeyToken=null'

the 'PublicKeyToken' is not null, because i have publicKey, but where can i change this(if this is the problem)..

i followed those instruction to sign those dll's:


thank you...
Feb 25, 2007 at 9:00 PM
The configuration tool always uses the assemblies it finds in its own directory - it does not check the GAC. You should copy your strong-named assemblies into the tool's directory (actually recompiling the tool using the strong-named assemblies may be necessary).

Feb 26, 2007 at 6:45 AM
thank you for your answer..
i put all my strong-named assemblies into the bin directory of enterprise library(C:\Program Files\Microsoft Enterprise Library January 2006\bin),
by using "copy assemblies to bin folder" batch file.
and still i get the same error., how can i recompiling the tool using the strong-named assemblies??

thank you...
Mar 14, 2007 at 10:44 PM
Hi all

On a related note to this (I am using the Jan 2006 release too):

Could someone please throw some light on what needs to be changed so that the Config tool looks for the signed assembly and emits the correct public key token (which I have with me) instead of null (may be a config file setting? I searched the entire 'EnterpriseLibrary.sln' solution for PublicKeyToken=null, and found only two instances, both in src\Configuration\Console\MainForm.resx)?

To clarify, I have strong named the assemblies, changed all the InternalsVisibleTo directives, and done a build of the EntLib and run CopyAssembly. Now, when I run the config tool from the bin directory just to check, I get the following when I try to add a new application:

System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Microsoft.Practices.EnterpriseLibrary.Common, Version=, Culture=neutral, PublicKeyToken=null'

Thanks in advance.
Mar 15, 2007 at 12:38 AM
Hi Subbu -

As noted above, the tool loads assemblies from its own assembly. However if the tool was compiled against classes that are not strongly named, replacing those same assemblies with strongly-named versions will not work. In particular the tool looks for the ConfigurationDesignManager attribute on any assemblies in its folder, and if the different assemblies reference a different version of the Configuration.Design.dll then the tool won't recognize it as being the same attribute.

To get around this, simply compile the tool and the core assemblies with a strong name and use that version with the other strong-named assemblies.

Mar 15, 2007 at 10:38 AM
Thanks Tom. I managed to get it right. Basically the issue was due to a mistake by me. Turns out that I had failed to strong name inside one project. Fixed that and compiled it as you suggested, and it works now.

May 7, 2007 at 8:15 PM
I met the same/similar problem. I strong-named all Enterprise library dll. I have recompiled all enterprise library and copied all dll and the configuration tool under C:\Program Files\Microsoft Enterprise Library January 2006\bin. The following error will appear if I try to add Exception handler, then add Exception Policy, and then add Exception Type. The tool should NOT look for a dll which PublicKeyToken=null, cause all dll are strong-named. What should I do to let it refers to the right dll?


Unable to load assembly 'Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=null'. Please copy the assembly file to the tools rundirectory at 'C:\Program Files\Microsoft Enterprise Library January 2006\bin\' and reload the configuration.
May 8, 2007 at 12:50 AM
Edited May 8, 2007 at 12:52 AM
Also, If anyone is working with stronly named assemblies and GAX be careful to replace the auto-generated references with references to your strongly named assemblies.

Recipies generate projects that use the assemblies in the program files\Microsoft Enterprise Library 3.0 - April 2007\bin folder. Is it possible to change this default behavior since this is a manual process and its possible for someone to miss a reference ?
May 8, 2007 at 3:38 PM
Edited May 8, 2007 at 3:39 PM


and now this, yet no fixes or patches or labeling this as an issue, tracking it, and fixing it.

As one can see even offering code and ideas goes no where, just reply posts for those who ask about the issue. Ohh wait what am I thinking there is no issue, sorry ignore me trying to point out that there is an issue when there is no issue. This must be a documentation error then.

- guy
May 9, 2007 at 1:55 AM
how to resolve this problem when i open a project within Visual Studio :

Package Load Failure

Package 'Microsoft.Practices.EnterpriseLibrary.Configuration.Design.VisualStudioIntegration.EnterpriseLibraryIntegrationPackage, Microsoft.Practices.EnterpriseLibrary.Configuration.Design.VisualStudioIntegration, Version=, Culture=neutral, PublicToken=b03f5f7f11d50a3a' has failed to load properly ...

May 30, 2007 at 4:41 PM
Tom Hollander has a solution for this issue,

May 31, 2007 at 11:58 PM

i've removed all Enterprise libraries except June 2005 release's.

i've verified in the registry for to finish cleanup.

i've installed new release but just the pre compiled binary.

i've read the this issue : http://blogs.msdn.com/tomholl/archive/2007/04/19/avoiding-configuration-pitfalls-with-incompatible-copies-of-enterprise-library.aspx

But i've yet the same problem. (See post May 8 at 9:55 PM)




simon wrote:
Tom Hollander has a solution for this issue,