还有其他人在使Sitecore 7.x和Solr 4.7与Glass Mapper 3.3配合使用方面遇到问题吗?看来Glass Mapper使用的是Castle Windsor IOC容器。而且Sitecore建议也为Solr使用Castle Windsor IOC容器。
据Sitecore称,他们告诉我应该使用Solr 4.7,并且应该使用Castle.core.dll和Castle.Windsor.dll的3.1版。但是,看起来Glass Mapper 3.3需要Castle.Core.dll 3.2+版本。
我想我不是唯一遇到此问题的人。但是我在网上找不到任何有关它的信息。
要详细说明Phil Degenhardt的注释,您可以使用绑定重定向配置,以使两个引用都解析为同一程序集。基本上,您需要设置一系列指向同一程序集的版本:
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Castle.Windsor"
publicKeyToken="xxxxxxxxxxxxxxx"
culture="neutral" />
<bindingRedirect oldVersion="3.1.0.0 - 3.1.9.0"
newVersion="3.2.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
您还可以通过如下设置进行探测,以使两个程序集版本并存:
<dependentAssembly>
<assemblyIdentity name="Castle.Windsor" publicKeyToken="xxxxxxxxxxxxx" />
<codeBase version="3.1.0.0" href="v31/Castle.Windsor.dll"/>
<codeBase version="3.2.0.0" href="v32/Castle.Windsor.dll"/>
</dependentAssembly>
如果程序集的公共部分发生更改,则第二个选项很有用,在您的情况下,重定向可能更有用。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句