title: .net 4 issues with EnterpriseLibrary.Caching
body: <p>In .net 4 website, I am making use of the Enterprise Library Caching assembly (Microsoft.Practices.EnterpriseLibrary.Caching.dll, version 4.0.0.0).</p>
  
  <p>When I try to get one of my caches using the method </p>
  
  <pre><code>CacheFactory.GetCacheManager("MyCacheManager")
  </code></pre>
  
  <p>, the .net runtime throws the following exception:</p>
  
  <p><strong>The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, MyCacheManager]) failed: 
  Object reference not set to an instance of an object. (Strategy type Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy, index 2)</strong></p>
  
  <p>Here is the full stack trace:</p>
  
  <p>==============================================================================</p>
  
  <p><strong>at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
     at Microsoft.Practices.ObjectBuilder2.Builder.BuildUp(IReadWriteLocator locator, ILifetimeContainer lifetime, IPolicyList policies, IStrategyChain strategies, Object buildKey, Object existing)
     at Microsoft.Practices.ObjectBuilder2.Builder.BuildUp[TTypeToBuild](IReadWriteLocator locator, ILifetimeContainer lifetime, IPolicyList policies, IStrategyChain strategies, Object buildKey, Object existing)
     at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IReadWriteLocator locator, ILifetimeContainer lifetimeContainer, String id, IConfigurationSource configurationSource)
     at Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory.GetCacheManager(String cacheManagerName)
     at MyProduct.MyProductDAL.MyProductDAL..ctor(String connectionString) in C:\Users\Yosief.Kesete\Documents\Visual Studio 2010\Projects\MyProduct\MyProductDAL\MyProductDAL.cs:line 39</strong></p>
  
  <p>================================================================================</p>
  
  <p>I am developing using VS 2010 on a 64-bit Windows 7 Professional PC. My site is hosted in IIS 7.5. I've also added references to the rest of the assemblies that go along with the caching assembly, such as :</p>
  
  <p>Microsoft.Practices.EnterpriseLibrary.Common.dll v4.0.0.0</p>
  
  <p>Microsoft.Practices.ObjectBuilder2.dll v2.1.0.0</p>
  
  <p>Microsoft.Practices.Unity.dll v2.0.414.0</p>
  
  <p>etc...</p>
  
  <p>Can anyone please help me?</p>