Exception message: Could not load file or assembly.....redux


Sure, we've all seen this message and usually it's a fairly simple fix, but this time I'm stumped. I've been updating packages on an older solution; not a big deal........until I updated Newtonsoft.Json to 12.0.3 and Microsoft.AspNet.WebApi.Core to 5.2.7. After this attempt, I continually get the error:

Could not load file or assembly 'System.Web.Http, 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)

However, my web.config has the following:

    <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="" newVersion="" />

Under my project's dependencies/packages I show Microsoft.AspNet.WebApi.Core (5.2.7)

I've tried reinstalling, cleaning and rebuilding the solution, and deleting the bin folders and rebuilding, but nothing seems to work, I continue to receive this error. Is there something I'm missing? Any suggestions would be appreciated.

asked on Stack Overflow Jun 7, 2020 by Indy Detour • edited Jun 7, 2020 by Peter Cordes

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0