Cześć,
mam taki problem. Projekt legacy, w nim AutoMapper w wersji 6.2.2.0. Taki jest widoczny w packages.config
<package id="AutoMapper" version="6.2.2" targetFramework="net461" />
Przy odpaleniu na runtime wali błędem:
System.IO.FileLoadException: 'Could not load file or assembly 'AutoMapper, Version=8.0.0.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'
Inner Exception
FileLoadException: Could not load file or assembly 'AutoMapper, Version=6.2.2.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Dodałem w App.config:
<dependentAssembly>
<assemblyIdentity name="AutoMapper" publicKeyToken="be96cd2c38ef1005" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="6.2.2.0" />
</dependentAssembly>
Ale nie pomogło. Nie wiem skąd mu się bierze ten 8.0.0.0
Pomożecie?