title: How to set the GOOGLE_APPLICATION_CREDENTIALS from Google Cloud Vision in C#?
body: <p>I am following <a href="https://cloud.google.com/vision/docs/libraries" rel="nofollow noreferrer">this tutorial</a> to use Google Vision API, but even configuring the authentication credentials I get the following error:</p>
  
  <blockquote>
    <p><strong>System.InvalidOperationException:</strong> 'The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See <a href="https://developers.google.com/accounts/docs/application-default-credentials" rel="nofollow noreferrer">https://developers.google.com/accounts/docs/application-default-credentials</a> for more information.'</p>
  </blockquote>
  
  <p>My code in Visual Studio 2017:</p>
  
  <pre><code>        // Instantiates a client
          var client = ImageAnnotatorClient.Create();
          // Load the image file into memory
          var image = Google.Cloud.Vision.V1.Image.FromFile(@"C:\Users\Maicon\OneDrive\Área de Trabalho\keyboardSantander\keyboard.png");
          // Performs label detection on the image file
          var response = client.DetectLabels(image);
          foreach (var annotation in response)
          {
              if (annotation.Description != null)
                  debugOutput(annotation.Description);
          }
  </code></pre>
  
  <p>What can I do to fix this? Do I have to create a trial account to use the Google Cloud API?</p>