Migrate.exe ignores link forwarding

I am trying to run a migrate.exe application from EntityFramework in a specific dll. This DLL refers to the Microsoft.Azure.KeyVault.WebKey nuget package.

When I try to run a command

 ./migrate MyProject.Data /startUpDirectory=C:\myDir /startUpConfigurationFile=C:\myDir\Redirect.config 

I get the following error

ERROR: Failed to load file or assembly Newtonsoft.Json, Version = 6.0.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6ae ed 'or one of its dependencies. The installed assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I would usually say that this is because he is looking for version 6 of Newtonsoft.Json and cannot find it. But I have a redirect binding pointing to the latest version.

 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" /> </dependentAssembly> </assemblyBinding> 

So, I do not understand why this will not be redirected to version 9.0.0.0 , and it is looking for version 6.0.0.0 .

I decompiled Microsoft.Azure.KeyVault.WebKey.dll , and I see that it refers to version 6.0.0.0 , so WHY is looking for this version, but I cannot understand why it is not being redirected.

+5
source share

Source: https://habr.com/ru/post/1267278/


All Articles