located assembly's manifest definition does not match the assembly reference


I've got a console EXE written in C# in Visual Studio 2015. Originally in .Net 4.62. It uses some dependencies on a package called 'CertMgmt.SDK' which is internal to our company. That package has a dependency on another package called 'Polly'. Right now the internal cert management package (CertMgmt.SDK) is version (though that probably doesn't matter terribly) and the Polly package is 7.2.0. Both are the latest versions I can get from our company's internal NuGet package sources (which I have to use). Everything builds fine, but when I run it, I get:

Unhandled Exception: System.ApplicationException: An error occurred with following message: Could not load file or assembly 'Polly, Version=, Culture=neutral, PublicKeyToken=c8a3ffc3f8f825cc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

This is when I attempt to call a function from CertMgmt.SDK.

I can't figure out where this Polly version is being referenced. Looking at the files in my project at the sections that relate to the CertMgmt.SDK or Polly, I see:


        <assemblyIdentity name="Polly" publicKeyToken="c8a3ffc3f8f825cc" culture="neutral"/>
        <bindingRedirect oldVersion="" newVersion=""/>


  <package id="Polly" version="7.2.0" targetFramework="net462" />
  <package id="CertMgmt.SDK" version="" targetFramework="net462" />

In my project's .csproj file

<Reference Include="Polly, Version=, Culture=neutral, PublicKeyToken=c8a3ffc3f8f825cc, processorArchitecture=MSIL">

<Reference Include="CertMgmt.SDK, Version=, Culture=neutral, processorArchitecture=MSIL">

I can't seem to find any other reference to that Polly package. I have removed the section from the App.Config which didn't seem to make a difference. I also tried to downgrade but our package source only has 6.0.1 and not 6.0.0 and even with that I got the same error message. Forcing it to try to get 6.0.0 builds with a package not found error. I've done a project clean also with no luck.

asked on Stack Overflow Jan 15, 2020 by Seril

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0