我打算使用CacheManager(http://cachemanager.michaco.net/)並試圖將其設置爲與CacheManager.Serialization配合使用。 JSON。它需要Newtonsoft.Json(> = 8.0.3)。CacheManager.Serialization.Json「無法加載文件或程序集'Newtonsoft.Json,版本= 8.0.0.0」
我已經通過NuGet安裝了Newtonsoft.Json 9.0.1。這是我的web.config
<cache name="redisWithBackplane" updateMode="Up" enableStatistics="false"
enablePerformanceCounters="false" backplaneName="localRedis" backplaneType="CacheManager.Redis.RedisCacheBackplane, CacheManager.StackExchange.Redis"
serializerType="CacheManager.Serialization.Json.JsonCacheSerializer, CacheManager.Serialization.Json">
<handle name="localRedis" ref="redisHandle" expirationMode="None" timeout="50s" isBackplaneSource="true" />
的摘錄,並在相同的web.config
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
我收到提示「無法加載文件或程序集Newtonsoft綁定重定向。 Json,版本= 8.0.0.0「,並且一旦我將Newtonsoft.Json替換爲版本8.0.0,它就開始工作。綁定重定向似乎沒有任何效果。任何想法。什麼可能是錯的?
Argh。問題是根標籤。我將它作爲用於inheritInChildApplications。一旦我將它改爲就行了。雖然VS2010抱怨無效inheritInChildApplications它仍然有效 –
酷,已經看着它,不能再現它^^ – MichaC