This issue continues to be a problem. I see several similar posts but they are all now a couple of years old.
I have referenced Google Apis via Nuget and now I am, quite frankly, in "Nuget hell". First, a rant, why so many assemblies and references when you use Nuget, what is the purpose of the .NET Framework? For example, why do I see a copy of System.IO DLL in my /bin folder? I struggled for awhile just to get my website to run any of my code. After I upgraded all of my assemblies to 4.0, and after I ran updates on my local .Net install running on Windows 8.1, I have my local dev website working again. When I call any page on my site that calls the Google drive assembly code, I get this error:
Could not load file or assembly 'System.Net.Http.Primitives, Version=188.8.131.52, 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)
I've been round and round with the suggestions to map assemblies from this post: Google Drive SDK System.Net.Http.Primitives Version 184.108.40.206 instead of 220.127.116.11 And either it doesn't work, or I do not have the correct assembly mappings. I'm really at a loss.
I have compiled my Google Drive code and assembly separate of my web application assemblie(s). My Google Drive code is working perfect and I only have an issue when I try to reference this project from my web application.
I can't find any additional tips here or from Google. I am stuck.