Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top