I'm getting the same error.
web.config:
<configSections>
<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
<cachingConfiguration defaultCacheManager="Cache Manager">
<cacheManagers>
<add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
numberToRemoveWhenScavenging="10" backingStoreName="Null Storage"
name="Cache Manager" />
</cacheManagers>
<backingStores>
<add encryptionProviderName="" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Null Storage" />
</backingStores>
</cachingConfiguration>
code:
Imports Microsoft.Practices.EnterpriseLibrary.Caching
Imports Microsoft.Practices.EnterpriseLibrary.Caching.Expirations
Partial Class test
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles Me.Load
Dim cache As CacheManager
cache = CacheFactory.GetCacheManager()
cache.Add("key", "value", CacheItemPriority.Normal, Nothing, New SlidingTime(TimeSpan.FromMinutes(5)))
error:
happens in CacheFactory.cs -> public static CacheManager GetCacheManager():
configurationException{"An error occurred creating the configuration section handler for cachingConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Caching, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
The following dll are referenced in the web project:
Microsoft.Practices.EnterpriseLibrary.Caching.dll (v3.1.0.0)
Microsoft.Practices.EnterpriseLibrary.Common.dll (v3.1.0.0)