We have moved to GitHub Issues
Created by Pascal Albrecht 09 Feb 2015, 10:40:43 Updated by Shannon Deminick 16 Jun 2015, 08:20:13
Our Umbraco project is using the UmbracoCmsCore 7.2.1 NuGet package and I added another NuGet package to implement a custom feature. The added NuGet package depends on AutoMapper version 3.3.0, which caused an automatic update of the library for the project.
I expected Umbraco to run normaly after the AutoMapper update. However, the Umbraco libraries are explicitly comiled for AutoMapper version 3.0.0 and the Umbraco application fails to start with following error:
Could not load types from assembly businesslogic, Version=1.0.5462.37510, Culture=neutral, PublicKeyToken=null, errors: Exception: System.IO.FileLoadException: Could not load file or assembly 'AutoMapper, Version=126.96.36.199, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'AutoMapper, Version=188.8.131.52, Culture=neutral, PublicKeyToken=null' To be able to use this library, Umbraco would need to be updated to AutoMapper version 3.3.0.
As a workaround for now you should be able to do an assembly redirect in your web.config.
It doesn't seem to be possible to use an assembly redirect because AutoMapper version 184.108.40.206 is referenced with a PublicKeyToken=null. However, AutoMapper version 220.127.116.11 seems to use PublicKeyToken=be96cd2c38ef1005.
@sebastiaan It doesn't seem to be possible to use an assembly redirect because AutoMapper version 18.104.22.168 is referenced with a PublicKeyToken=null. However, AutoMapper version 22.214.171.124 seems to use PublicKeyToken=be96cd2c38ef1005.
Maybe leave 3.0.0 in the bin and put 3.3.0 in it's own folder and do the redirect like this:
@sebastiaan The workaround with the codebase setting works. I added following setting to the assemblyBinding to guide Umbraco to AutoMapper version 3.0.0:
Backwards Compatible: True
Due in version: 7.3.0