runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Could not load file or assembly System.Net.Http Version=4.0.0.0

Open huto1 opened this issue 9 years ago • 7 comments

System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

Does anyone have any experience with this kind of issue? It is a .net core 1.1 application, I have seen several solutions for similar problems, but they did not seem to work.

huto1 avatar Aug 13 '17 18:08 huto1

Did you try .NET Core 2.0 (Preview)? Do you have a minimal repro?

karelz avatar Aug 14 '17 01:08 karelz

I am unable to get core 2.0 installed, in fact any 2.0 version. Getting package restore failures on that. And I am not sure what a minimal repro is.

huto1 avatar Aug 14 '17 02:08 huto1

Can you try 2.0 on another machine? (e.g. VM) Minimal repro = as small repro as possible. Ideally HelloWorld with just few changes.

karelz avatar Aug 14 '17 02:08 karelz

removing this helped solve the problem

<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.3" />

huto1 avatar Aug 14 '17 19:08 huto1

@huto1

I am unable to get core 2.0 installed, in fact any 2.0 version. Getting package restore failures on that.

That's not good. Can you please open a separate issue for that, with details? Either in the CoreFX repo or perhaps better at https://github.com/dotnet/sdk perhaps.

danmoseley avatar Aug 16 '17 18:08 danmoseley

Closing this issue since there is not enough information to diagnose. Let us know if this still repro's.

davidsh avatar Nov 22 '17 18:11 davidsh

I've got this issue in .net core 2.0, just to give you more idea about what I'm trying to achieve. I'm trying to connect to VSTS and update the test status "Passed" or "Failed" based on my unit tests I run of this "Could not load file or assembly System.Net.Http Version=4.0.0.0" issue where the code is trying to open a connection to vsts. var connection = new VssConnection("https://.visualstudio.com", credentials);

rizwaans avatar Mar 20 '18 21:03 rizwaans