[英]How to use Glass Mapper 3.3 with Sitecore 7.x and Solr 4.7
有沒有其他人在使用Sitecore 7.x和Solr 4.7與Glass Mapper 3.3一起工作時遇到問題? 似乎Glass Mapper使用Castle Windsor IOC容器。 並且Sitecore建議也使用Castle Windsor IOC容器進行Solr。
根據Sitecore,他們告訴我應該使用Solr 4.7,我應該使用Castle.core.dll和Castle.Windsor.dll 3.1版。 然而,看起來Glass Mapper 3.3需要版本3.2+的Castle.Core.dll。
我認為我不是唯一遇到這個問題的人。 但我在網上找不到任何關於它的內容。
要詳細說明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>
如果程序集的公共部分發生更改,則第二個選項很有用,重定向在您的情況下可能更有用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.