Installing . 5.3.0 gives runtime System.IO,Fileload.Exception on System.Net.Http.Formatting
Gulpener opened this issue · 3 comments
I installed the lates AspNetWebstac. Now I get on runtime this exception:
"typeName": "System.IO.FileLoadException",
"message": "Could not load file or assembly 'System.Net.Http.Formatting, Version=5.2.2.0, 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)",
When I check in the assemblies the location of the file, there is no DLL available:
It should be located in the following folder:
C:\Users\XXX.nuget\packages\microsoft.aspnet.webapi.owin\5.3.0\lib\net45
I only have the following files in this folder:
System.Web.Http.Owin.dll
System.Web.Http.Owin.xml
Thanks for contacting us. Can you please make sure that you've updated all your package dependencies to the latest version?>
The System.Net.Http.Formatting.dll assembly is not part of the Microsoft.AspNet.WebApi.Owin package. You can see that yourself here: https://nuget.info/packages/Microsoft.AspNet.WebApi.Owin/5.3.0
It is available through dependent packages though:
Microsoft.AspNet.WebApi.Owin -> Microsoft.AspNet.WebApi.Core -> Microsoft.AspNet.WebApi.Client
Actually, I have focused on your "assembly location" comment but maybe you're running into something similar to what's reported in the other thread: #421 ?
It looks similar with another package that is not found. I also have Microsoft.AspNet.WebApi.Client installed. Should this be 6.0.0?
My automated binding redirects are enabled.
All the dependent packages are updated.
In the folder:
C:\Users\XXX.nuget\packages\microsoft.aspnet.webapi.client\6.0.0\lib\net45
I have these packages.
System.Net.Http.Formatting.dll
System.Net.Http.Formatting.xml
But I found the solution. In my web.config was the binding direct to 5.2.9. I Updated it to 6.0.0 and it was fixed.