Could not load file or assembly 'Microsoft.IdentityModel.Protocols.WsFederation


I have a ASP.NET legacy project to which ADFS authentication needs to be added. So I did the same but when I run the application, I keep getting this error:

Could not load file or assembly 'Microsoft.IdentityModel.Protocols.WsFederation, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Here is my web.config entry for the said assembly

    <assemblyIdentity name="Microsoft.IdentityModel.Protocols.WsFederation" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="" newVersion="" />

and my packages.json entry

 <package id="Microsoft.IdentityModel.Protocols.WsFederation" version="5.3.0" targetFramework="net452"/>

Why does the solution still search for version 5.2.0 when I refer to version 5.3.0?

asked on Stack Overflow Nov 21, 2019 by Tony Stark • edited Nov 21, 2019 by Lorenzo Isidori

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0