1
votes

For a project I'm using Sitecore version 7 and the latest version of GlassMapper. It's an ASP.net MVC3 project. When I try to add a new controller, an error occured:

Microsoft Visual Studio

Could not load file or assembly 'Sitecore.Kernel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Can GlassMapper work with Sitecore version 7.0? Does anyone know how to solve this problem? I don't like it if I need to downgrade to Sitecore version 6.6.

Thanks a lot.

Jordy

1
It works with Sitecore 7, how did you install, using NuGet?jammykam
Yes, that's right. I used NuGet for installing GlassMapper.Jordy
Did you install version2 (Glass.Sitecore.Mapper) or version 3 (Glass.Mapper.Sc)?jammykam
Glass.Mapper.Sc Version 3.1.2.18.Jordy
Actually, re-reading your question, I think this is a Sitecore Rocks error. Make sure you are using the latest versionjammykam

1 Answers

1
votes

It is possible that one of the other assemblies is referencing sitecore 6 dll. You could override it in your configuration to use sitecore 7 like this.

<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>

hope this helps.