0

After having trouble getting any of Google's samples to work I tried using the info here to test using the Analytics API:

How do I use a Service Account to Access the Google Analytics API V3 with .NET C#?

The first unexpected issue was that I had to switch my project from .NET 4.0 to 4.5 in order for the compiler to accept the Google.Api.* namespaces. I would have preferred to stay with 4.0 but maybe that is a stated requirement that I missed?

My main issue though is that when I try to create a new AnalyticsService object I get: "Could not load file or assembly 'System.Net.Http.Primitives, Version=1.5.0.0...'" I saw one or two similar complaints but the only suggestion I found was to use the API's NuGet package, which didn't help. Any ideas/suggestions?

Community
  • 1
  • 1
user2684115
  • 23
  • 1
  • 4

1 Answers1

0

Follow the instructions on the build page for the .NET api (copied here as per community suggestions):

  1. Install the specific Google API you want to use (e.g. Google.Apis.Calendar.v3)
  2. Install Google.Apis.Authentication
CCBlackburn
  • 1,704
  • 1
  • 13
  • 22