Could not load file or assembly 'Microsoft.Practices.ObjectBuilder2

Topics: Caching Application Block , General discussion
May 7, 2010 at 8:10 AM

This is a continuation of the thread in

How did you obtain your copy of the entlib assemblies?  Where did you download it? 

In your config, does your entlib assemblies have publickeytokens?  If yes, make sure that you have the strong-named version of the assemblies.  To check this, try if you can place those assemblies in GAC.  If you can't , then they're not strong-named.   You can obtain the strong-named versions by installing entlib, or if you already did, it's in the bin folder of the Enterprise Library installation folder.


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc. 

May 7, 2010 at 8:22 AM

I got the dll from

I have something like that:

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
  <bindingRedirect oldVersion="" newVersion="" />
How to place the assemblies in GAC?
From where can I have entlib? 


May 7, 2010 at 8:31 AM

That is the System.Web.Mvc assembly, you have to look for any entlib assembly, caching or logging or whatever you have in your config.  EntLib 4.1 can be downloaded here -

"How to place the assemblies in GAC?" - If you're working on XP, you just simply drag the assembly to C:\Windows\assembly folder.  If you're on Win7 or WinVista, you need to install assemblies to GAC using the msiexec command.  Remember that you only want to know if you're assembly is strong-named so if you were able to place them in GAC, remove them again if you're app doesn't need it to be there.

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc. 

May 7, 2010 at 8:44 AM

I have the following:

    <section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings,Microsoft.Practices.EnterpriseLibrary.Caching" />

<cachingConfiguration defaultCacheManager="Default Cache Manager">
      <add name="persistent" partitionName="CacheIsolated" encryptionProviderName=""
				type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.IsolatedStorageBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching" />
      <add name="Persistent Cache Manager"
				type="Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager, Microsoft.Practices.EnterpriseLibrary.Caching"
				backingStoreName="persistent" />

The assemblies Microsoft.Practices.EnterpriseLibrary.Caching.dll , and Microsoft.Practices.EnterpriseLibrary.Common.dll are not strongly named.  However, the Microsoft.Practices.ObjectBuilder2.dll is strongly named. How to proceed now?

May 7, 2010 at 9:11 AM

You could download and install entlib 4.1.  You will have the option to install the source code too, so go ahead and install it.  Get the unsigned version of ObjectBuilder2 from EntLib41src\bin folder (location of the source code).


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc. 

May 7, 2010 at 9:17 AM

Thank you very much, it has solved my problem.