Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.IO.FileLoadException: Could not load file or assembly 'System.Net.Http.Primitives, Version=1.5.0.0 #518

Closed
GoogleCodeExporter opened this issue May 19, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

I used the latest version of Google Calendar API from Nuget and i am getting 
this error when running my program. I am using .net c#

Adding the following to my .config file and it does not help
<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" />
    <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="1.5.0.0" newVersion="4.2.28.0" />
    </dependentAssembly>
  </runtime>
  <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup>

I have checked out solutions on the internet and some people added the above to 
.config file and resolve their issues but not in my case.

Please advise

System.IO.FileLoadException: Could not load file or assembly 
'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located 
assembly's manifest definition does not match the assembly reference. 
(Exception from HRESULT: 0x80131040)
File name: 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a'
   at Google.Apis.Http.HttpClientFactory.CreateHandler(CreateHttpClientArgs args)
   at Google.Apis.Http.HttpClientFactory.CreateHttpClient(CreateHttpClientArgs args)
   at Google.Apis.Auth.OAuth2.ServiceAccountCredential..ctor(Initializer initializer)

Original issue reported on code.google.com by vinguyen...@gmail.com on 8 Dec 2014 at 2:58

@GoogleCodeExporter
Copy link
Author

Take a look in:
http://stackoverflow.com/questions/18370360/could-not-load-file-or-assembly-syst
em-net-http-primitives-located-assemblys-m
and
http://stackoverflow.com/questions/21057052/asp-net-app-crashes-could-not-load-f
ile-or-assembly-microsoft-threading-tasks/21343949#21343949

They had similar issues.

I'm closing this issue for now, if it still happens, please feel free to open a 
new stack overflow issue.
THANKS!

Original comment by pele...@google.com on 10 Dec 2014 at 4:13

  • Changed state: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant