I am building a Google Calendar V3 class library in C# .Net 4.5 using MS Studio Express 2012 on a fully-updated Win 7 Pro.
I created the project and made an exact copy of the code I used in a Console app to do the same authorization.
The only difference in the setup of the apps is that the original is the sum of 3 days work setting up references that actually work.
For the new app I followed the directions in a Google Wiki (
Build Wiki) that told me to use NuGet and install Google_Apis_Calendar_v3 and then Google_Apis_Authentication.
Once installed, the app compiled just fine with no errors or warnings.
However, when I run the app, I get the following error:
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 system cannot find the file specified.
at Google.Apis.Http.HttpClientFactory.CreateHandler(CreateHttpClientArgs args)
at Google.Apis.Http.HttpClientFactory.CreateHttpClient(CreateHttpClientArgs args) in c:\code.google.com\google-api-dotnet-client\default_3\Tools\Google.Apis.Release\bin\Debug\output\default\Src\GoogleApis\Apis\Http\HttpClientFactory.cs:line 36
at Google.Apis.Services.BaseClientService.CreateHttpClient(Initializer initializer) in c:\code.google.com\google-api-dotnet-client\default_3\Tools\Google.Apis.Release\bin\Debug\output\default\Src\GoogleApis\Apis\Services\BaseClientService.cs:line 217
at Google.Apis.Services.BaseClientService..ctor(Initializer initializer) in c:\code.google.com\google-api-dotnet-client\default_3\Tools\Google.Apis.Release\bin\Debug\output\default\Src\GoogleApis\Apis\Services\BaseClientService.cs:line 181
at Google.Apis.Calendar.v3.CalendarService..ctor(Initializer initializer) in c:\code\google.com\google-api-dotnet-client\default\Tools\Google.Apis.NuGet.Publisher\Template\Build\Google.Apis.Calendar.v3.cs:line 939
at CalProc.Initialize()
When I look at the System.Net.Http.Primitives in the references it shows me:
..... \Microsoft.Net.Http.2.1.10\lib\net45\System.Net.Http.Primitives.dll
Google should be embarrassed by the lack of quality and support of the Google Calendar V3 API "package" especially when thye publish a Wiki in August of this year that ultimately doesn't work.
Unfortunately I don't remember what I did during the 3 days on the first app, I just tried things until the app worked.
Does anyone know how to fix this?
Regards,
Jim