- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当前版本的 SysCache 似乎不适用于 NHibernate 3.3。我替换了我的 web/bin 目录中的 NHibernate dll,并保持 SysCache dll(适用于 3.2)不变。现在,当 IIS 尝试进行预绑定(bind)时,它会加载 SysCache dll 并尝试将其绑定(bind)到 NHibernate 3.2.0.4000 并失败。
[FileLoadException: Could not load file or assembly 'NHibernate, Version=3.2.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +95
System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +54 System.Type.GetType(String typeName) +50 NHibernate.Util.ReflectHelper.TypeFromAssembly(AssemblyQualifiedTypeName name, Boolean throwOnError) +338
NHibernate.Cfg.SettingsFactory.CreateCacheProvider(IDictionary`2 properties) +175[HibernateException: could not instantiate CacheProvider: NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache]
NHibernate.Cfg.SettingsFactory.CreateCacheProvider(IDictionary2
2 properties) +3449 NHibernate.Cfg.Configuration.BuildSettings() +29 NHibernate.Cfg.Configuration.BuildSessionFactory() +44
properties) +256
NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary
<property name="cache.use_second_level_cache">true</property>
<property name="cache.use_query_cache" >true</property>
<property name="cache.provider_class">NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache</property>
最佳答案
一种不同且稍微简单的方法是覆盖对 3.2
的引用。您的 web.config
中的 NHibernate 版本或 app.config
引用所需版本3.3
像这样:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NHibernate" culture="neutral" publicKeyToken="aa95f207798dfdb4" />
<bindingRedirect newVersion="3.3.0.4000" oldVersion="0.0.0.0-3.3.0.4000" />
</dependentAssembly>
</assemblyBinding>
</runtime>
关于NHibernate 3.3 和 SysCache,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10491876/
如果我通过 nuget 安装 NHibernate 和 Syscache,我会收到一个很大的“无法加载文件或程序集”错误。 Syscache 基本上是针对 NH 3.2 构建的,但 nuget 上的当
当前版本的 SysCache 似乎不适用于 NHibernate 3.3。我替换了我的 web/bin 目录中的 NHibernate dll,并保持 SysCache dll(适用于 3.2)不变。
我正在开发一个 Web 应用程序,我希望缓存能够跨 Web 请求持续存在。 我知道一级缓存仅针对每个 session 。我启用了二级缓存,这适用于查询。 但是,二级缓存似乎不适用于“获取”实体……因此
使用它,我可以告诉 Fluent NHibernate 使用 SysCache 作为二级缓存提供程序: MsSqlConfiguration.MsSql2008.ShowSql().Connectio
我尝试使用来自网站的这篇文章的缓存配置: NHibernate.Caches.SysCache.SysCacheProvider
我一直在浏览互联网,似乎找不到可以下载适用于 NHibernate 3.1.0.4000 的 nhibernate.caches.syscache v3.1 的地方。 我有 3.0.0.4000 版的
我是一名优秀的程序员,十分优秀!