Problem z wersją AutoMappera

0

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?

0

A w References w projekcie co jest?

1

6.2.2.0 Sprawdziłem we wszystkich projektach w solucji wszędzie jest 6.2.2.0 Nie wiem już gdzie i jak szukać

Może inna biblioteka wymaga zależności na wyższą wersję?

0

Zobacz narzędziem: https://github.com/mikehadlow/AsmSpy

Być może będzie trzeba będzie użyć wtedy także starszej wersji biblioteki z tym samym mapperem.

1 użytkowników online, w tym zalogowanych: 0, gości: 1