migrate.exe忽略绑定重定向

Dav*_*ton 6 c# entity-framework .net-assembly assembly-binding-redirect

我试图migrate.exeEntityFramework特定的DLL上运行该应用程序.此DLL引用Microsoft.Azure.KeyVault.WebKeynuget包.

当我尝试运行命令时

./migrate MyProject.Data /startUpDirectory=C:\myDir /startUpConfigurationFile=C:\myDir\Redirect.config
Run Code Online (Sandbox Code Playgroud)

我收到以下错误

错误:无法加载文件或程序集"Newtonsoft.Json,Version = 6.0.0.0,Culture = neutral,PublicKeyToken = 30ad4fe6b2a6ae ed"或其中一个依赖项.定位的程序集的清单定义与程序集引用不匹配.(HRESULT除外:0x80131040)

通常我会说这是因为它正在寻找版本6 Newtonsoft.Json而无法找到它.但我有一个绑定重定向指向最新版本.

<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>
Run Code Online (Sandbox Code Playgroud)

所以,我不明白为什么这不会重定向到版本9.0.0.0,它只查找版本6.0.0.0.

我已经反编译了Microsoft.Azure.KeyVault.WebKey.dll,我可以看到它正在引用版本,6.0.0.0所以这是为什么它正在寻找那个版本,但我不明白为什么它不重定向.