У меня возникла проблема: во время выполнения мое приложение получает исключение:
System.IO.FileNotFoundException: 'Could not load file or assembly 'Azure.Core, Version=1.40.0.0, Culture=neutral,
PublicKeyToken=92742159e12e44c8' or one of its dependencies.
The system cannot find the file specified.'
Самое смешное, что пакет nuget, который я установил, имеет версию 1.41.0.0.
Кажется, я нигде не могу найти ссылку на версию 1.40. 0.0.
Я также проверил свою выходную папку, чтобы увидеть версию Azure.Core, и это правильно: 1.41.0.0
В файле app.config я вижу, что у меня есть привязкаRedirect:
Я ломаю голову, почему это происходит?
После установки моего MSBuild на диагностику он читает следующее :
Unified primary reference "Azure.Core, Version=1.41.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8". (TaskId:21)
1> Using this version instead of original version "1.40.0.0" in "C:\Users\user\.nuget\packages\azure.identity\1.12.0\lib\netstandard2.0\Azure.Identity.dll" because AutoUnify is 'true'. (TaskId:21)
1> Using this version instead of original version "1.37.0.0" in "C:\Users\user\.nuget\packages\azure.security.keyvault.secrets\4.6.0\lib\netstandard2.0\Azure.Security.KeyVault.Secrets.dll" because AutoUnify is 'true'. (TaskId:21)
1> Resolved file path is "C:\Users\user\.nuget\packages\azure.core\1.41.0\lib\net472\Azure.Core.dll". (TaskId:21)
1> Reference found at search path location "{RawFileName}". (TaskId:21)
1> Found related file "C:\Users\user\.nuget\packages\azure.core\1.41.0\lib\net472\Azure.Core.xml". (TaskId:21)
1> This reference is not "CopyLocal" because at least one source item had "Private" set to "false" and no source items had "Private" set to "true". (TaskId:21)
Подробнее здесь: https://stackoverflow.com/questions/787 ... n-1-40-0-0