我打算使用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