如何将Glass Mapper 3.3与Sitecore 7.x和Solr 4.7一起使用

如何将Glass Mapper 3.3与Sitecore 7.x和Solr 4.7一起使用,sitecore,castle-windsor,solr4,sitecore7,glass-mapper,Sitecore,Castle Windsor,Solr4,Sitecore7,Glass Mapper,还有其他人在让Sitecore 7.x和Solr 4.7使用Glass Mapper 3.3时遇到问题吗?玻璃地图绘制者似乎使用了温莎城堡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+版本 我想我不是唯一一个有这个问题

还有其他人在让Sitecore 7.x和Solr 4.7使用Glass Mapper 3.3时遇到问题吗?玻璃地图绘制者似乎使用了温莎城堡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>


如果程序集的公共部分发生更改,则第二个选项很有用,重定向在您的情况下可能更有用。

您是否在应用程序配置中尝试过绑定重定向?谢谢。成功了。我可以重定向到3.2。