title: Using Google.Cloud.BigQuery.V2 API in Azure Functions
body: <p>Is there a way to use Google.Cloud.BigQuery.V2 (1.0.0-beta10) API in Azure Functions?</p>
  
  <p>I like to use this API and my C# code in Azure Functions but get this error:</p>
  
  <pre><code>error CS0103: The name 'BigQueryClient' does not exist in the current context
  error CS0246: The type or namespace name 'BigQueryTable' could not be found (are you missing a using directive or an assembly reference?)
  error CS0246: The type or namespace name 'BigQueryJob' could not be found (are you missing a using directive or an assembly reference?)
  error CS0246: The type or namespace name 'CreateQueryJobOptions' could not be found (are you missing a using directive or an assembly reference?)
  error CS0246: The type or namespace name 'BigQueryResults' could not be found (are you missing a using directive or an assembly reference?)
  error CS0246: The type or namespace name 'GetQueryResultsOptions' could not be found (are you missing a using directive or an assembly reference?)
  Compilation failed.
  </code></pre>
  
  <p>In my project.json I have the following code:</p>
  
  <pre><code>{
    "frameworks": {
      "net46":{
        "dependencies": {
          "Google.Cloud.BigQuery.V2": "1.0.0-beta10"
        }
      }
     }
  }
  </code></pre>
  
  <p>I think the API is in .NET version 4.5 and Azure Functions needs 4.6. So it seems there is no way to use this API in AF?
  I tried it also with "net45" but get the same errors.</p>
  
  <p>UPDATE: This API is working on AF (see also comment below). Compilation succeeded. But my function is still not working because of missing credentials. In my Visual Studio the code is running and working like it should but in AF I got the following error:</p>
  
  <pre><code>Exception while executing function: Functions.TimerTriggerCSharp1. mscorlib: Exception has been thrown by the target of an invocation. Google.Api.Gax: 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 https://developers.google.com/accounts/docs/application-default-credentials for more information.
  </code></pre>
  
  <p>I already generated a service account key as json file an uploaded to my AF. Normally, I think, I get access to my tables on BigQuery through knowing the project and dadaset IDs like this in my C# code:</p>
  
  <pre><code>string projectId = "...";
  string datasetId = "...";
  
  var client = BigQueryClient.Create(projectId);
  
  List&lt;BigQueryTable&gt; tables = client.ListTables(datasetId).ToList();
  </code></pre>