Code Monkey home page Code Monkey logo

Exception executing the library with netcoreapp1.1: Could not load file or assembly 'System.Net.Http, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. about csharp HOT 7 CLOSED

kubernetes-client avatar kubernetes-client commented on June 27, 2024
Exception executing the library with netcoreapp1.1: Could not load file or assembly 'System.Net.Http, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

from csharp.

Comments (7)

brendandburns avatar brendandburns commented on June 27, 2024

Thanks for the details!

I'll ping the autorest folks and see if I can get them to see what the right solution is here.

from csharp.

brendandburns avatar brendandburns commented on June 27, 2024

Quick update, I updated the project to use netcoreapp2.0 and things seem to work:

<TargetFramework>netcoreapp2.0</TargetFramework>

Can you see if that fixes things for you? I may just migrate forward to netcoreapp2.0 if that fixes things...

from csharp.

brendandburns avatar brendandburns commented on June 27, 2024

Actually this was just for build. When I try to run the tests I seem to run into this:

xunit/xunit#1199

from csharp.

sesispla avatar sesispla commented on June 27, 2024

Asking @sergiomcalzada for help.

We've been having a look to netcoreapp2.0 (same result). Then had a look to System.Net.Http 4.3.2 Package, and found that internal version is 4.1.1.1, but the target framework is different:

Sergios-MacBook-Pro:packages Sergio$ monodis --assembly System.Net.Http/4.3.2/runtimes/
unix/ win/
Sergios-MacBook-Pro:packages Sergio$ monodis --assembly System.Net.Http/4.3.2/runtimes/unix/lib/netstandard1.6/System.Net.Http.dll
Assembly Table
Name:          System.Net.Http
Hash Algoritm: 0x00008004
Version:       4.1.1.1
Flags:         0x00000001
PublicKey:     BlobPtr (0x00002101)
        Dump:
0x00000000: 00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00
0x00000010: 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00
0x00000020: 07 D1 FA 57 C4 AE D9 F0 A3 2E 84 AA 0F AE FD 0D
0x00000030: E9 E8 FD 6A EC 8F 87 FB 03 76 6C 83 4C 99 92 1E
0x00000040: B2 3B E7 9A D9 D5 DC C1 DD 9A D2 36 13 21 02 90
0x00000050: 0B 72 3C F9 80 95 7F C4 E1 77 10 8F C6 07 77 4F
0x00000060: 29 E8 32 0E 92 EA 05 EC E4 E8 21 C0 A5 EF E8 F1
0x00000070: 64 5C 4C 0C 93 C1 AB 99 28 5D 62 2C AA 65 2C 1D
0x00000080: FA D6 3D 74 5D 6F 2D E5 F1 7E 5E AF 0F C4 96 3D
0x00000090: 26 1C 8A 12 43 65 18 20 6D C0 93 34 4D 5A D2 93
Culture:

Sergios-MacBook-Pro:packages Sergio$ monodis --assembly System.Net.Http/4.3.2/runtimes/win/lib/netstandard1.3/System.Net.Http.dll
Assembly Table
Name:          System.Net.Http
Hash Algoritm: 0x00008004
Version:       4.1.1.1
Flags:         0x00000001
PublicKey:     BlobPtr (0x00001d00)
        Dump:
0x00000000: 00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00
0x00000010: 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00
0x00000020: 07 D1 FA 57 C4 AE D9 F0 A3 2E 84 AA 0F AE FD 0D
0x00000030: E9 E8 FD 6A EC 8F 87 FB 03 76 6C 83 4C 99 92 1E
0x00000040: B2 3B E7 9A D9 D5 DC C1 DD 9A D2 36 13 21 02 90
0x00000050: 0B 72 3C F9 80 95 7F C4 E1 77 10 8F C6 07 77 4F
0x00000060: 29 E8 32 0E 92 EA 05 EC E4 E8 21 C0 A5 EF E8 F1
0x00000070: 64 5C 4C 0C 93 C1 AB 99 28 5D 62 2C AA 65 2C 1D
0x00000080: FA D6 3D 74 5D 6F 2D E5 F1 7E 5E AF 0F C4 96 3D
0x00000090: 26 1C 8A 12 43 65 18 20 6D C0 93 34 4D 5A D2 93
Culture:

Also tried to make a Assembly Redirect, but it makes no sense, since Assembly version is 4.1.1.1 also for package 4.3.2...

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.1.1.1" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

@sergiomcalzada could you please make a fast test on Windows with netcoreapp1.1 and without AssemblyRedirect?

from csharp.

sergiomcalzada avatar sergiomcalzada commented on June 27, 2024

Hello,

I tested it on windows and I discovered a missed package reference in the test project.

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />

I created a pull request with some changes that runs all test (except KubernetesClientCredentialsTests PasswordNull)

Assert.Throws() Failure
Expected: typeof(System.ArgumentNullException)
Actual:   (No exception was thrown)
   at k8s.Tests.KubernetesClientCredentialsTests.PasswordNull() in C:\Repositorios\External\kubernetes-client\csharp\tests\KubernetesClientCredentialsTests.cs:line 34

from csharp.

sesispla avatar sesispla commented on June 27, 2024

Thank you @sergiomcalzada!

If I am correct, your PR is #14. Travis-CI looks good (two errors not related with this issue left to fix), so let's wait for the Merge to close the issue.

Thx!

from csharp.

sesispla avatar sesispla commented on June 27, 2024

Fixed in PR #14

from csharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.