2014-01-16 24 views
1

對於我正在使用Sitecore版本7和最新版本GlassMapper的項目。這是一個ASP.net MVC3項目。當我嘗試添加一個新的控制器,出現錯誤:如何解決無法使用Sitecore7和Glassmapper加載程序集

微軟的Visual Studio

無法加載文件或程序集「Sitecore.Kernel,版本= 6.0.0.0, 文化=中立,公鑰= null「或它的一個依賴關係。 系統找不到指定的文件。

GlassMapper可以使用Sitecore版本7.0嗎?有誰知道如何解決這個問題?如果我需要降級到Sitecore版本6.6,我不喜歡它。

非常感謝。

的Jordy

+0

它與Sitecore 7,您如何安裝,使用NuGet? – jammykam

+0

是的,沒錯。我使用NuGet來安裝GlassMapper。 – Jordy

+0

您是否安裝了版本2(Glass.Sitecore.Mapper)或版本3(Glass.Mapper.Sc)? – jammykam

回答

1

可能的是,其他的組件中的一個被引用Sitecore的6 DLL。你可以在你的配置中覆蓋它來像這樣使用sitecore 7。

<configuration> 
<runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
     <dependentAssembly> 
      <assemblyIdentity name="Sitecore.Kernel" publicKeyToken="31bf3856ad364e35" culture="neutral" /> 
      <bindingRedirect oldVersion="5.0.0.0-6.6.0.0" newVersion="7.1.0.0" /> 
     </dependentAssembly> 
     <dependentAssembly> 
</runtime> 

希望這會有所幫助。

+0

試過了,但並沒有解決問題。 – Jordy

+0

您是否嘗試重新安裝sitecore? – xoail

相關問題