googleapis / google-cloud-dotnet

Google Cloud Client Libraries for .NET
https://cloud.google.com/dotnet/docs/reference/
Apache License 2.0
928 stars 365 forks source link

Datastore library successfully authenticates when no auth information available. #797

Closed SurferJeffAtGoogle closed 7 years ago

SurferJeffAtGoogle commented 7 years ago

I cleared all my authentication information: the GOOGLE_APPLICATION_CREDENTIALS variable and gcloud. Yet these tests still pass, and they can't pass without credentials.

PS C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api> gci env:GOOGLE*

Name                           Value
----                           -----
GOOGLE_PROJECT_ID              bookshelf-dotnet
GOOGLE_BUCKET                  bookshelf-dotnet

PS C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api> gcloud auth list
No credentialed accounts.

To login, run:
  $ gcloud auth login `ACCOUNT`

PS C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api> cat .\runTests.ps1
# Copyright(c) 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
Import-Module ..\..\BuildTools.psm1 -DisableNameChecking

BackupAndEdit-TextFile ".\QuickStart\QuickStart.cs" `
    @{"YOUR-PROJECT-ID" = $env:GOOGLE_PROJECT_ID} `
{
    Build-Solution
    packages\xunit.runner.console.2.1.0\tools\xunit.console.exe `
        .\QuickStartTest\bin\Debug\QuickStartTest.dll `
        .\TaskListTest\bin\Debug\DatastoreTest.dll `
        -parallel none
}
PS C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api> .\runTests.ps1
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
All packages listed in packages.config are already installed.
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 2/21/2017 9:10:41 AM.
Project "C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\Datastore.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|Any CPU".
Project "C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\Datastore.sln" (1) is building "C:\Users\Je
ffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\TaskListTest\DatastoreTest.csproj" (2) on node 1 (default targe
ts).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the i
nput files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
_CopyOutOfDateSourceItemsToOutputDirectory:
Skipping target "_CopyOutOfDateSourceItemsToOutputDirectory" because all output files are up-to-date with respect to th
e input files.
_CopyAppConfigFile:
Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
  DatastoreTest -> C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\TaskListTest\bin\Debug\DatastoreT
  est.dll
Done Building Project "C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\TaskListTest\DatastoreTest.cs
proj" (default targets).

Project "C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\Datastore.sln" (1) is building "C:\Users\Je
ffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\TaskList\TaskList.csproj" (3) on node 1 (default targets).
GenerateBindingRedirects:
  No suggested binding redirects from ResolveAssemblyReferences.
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the i
nput files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
_CopyOutOfDateSourceItemsToOutputDirectory:
Skipping target "_CopyOutOfDateSourceItemsToOutputDirectory" because all output files are up-to-date with respect to th
e input files.
_CopyAppConfigFile:
Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
  TaskList -> C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\TaskList\bin\Debug\TaskList.exe
Done Building Project "C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\TaskList\TaskList.csproj" (de
fault targets).

Project "C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\Datastore.sln" (1) is building "C:\Users\Je
ffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\QuickStart\QuickStart.csproj" (4) on node 1 (default targets).
GenerateBindingRedirects:
  No suggested binding redirects from ResolveAssemblyReferences.
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the i
nput files.
CoreCompile:
  C:\Program Files (x86)\MSBuild\14.0\bin\csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:anycpu32bitpreferred
   /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-
  docs-samples\datastore\api\packages\Google.Api.CommonProtos.1.0.0-beta05\lib\net45\Google.Api.CommonProtos.dll" /refe
  rence:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\Google.Api.Gax.1.0.0-beta06\lib\ne
  t45\Google.Api.Gax.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\Googl
  e.Api.Gax.Grpc.1.0.0-beta06\lib\net45\Google.Api.Gax.Grpc.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-do
  cs-samples\datastore\api\packages\Google.Apis.Auth.1.20.0\lib\net45\Google.Apis.Auth.dll" /reference:"C:\Users\Jeffre
  y Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\Google.Apis.Auth.1.20.0\lib\net45\Google.Apis.Auth.Platf
  ormServices.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\Google.Apis.
  Core.1.20.0\lib\net45\Google.Apis.Core.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastor
  e\api\packages\Google.Apis.1.20.0\lib\net45\Google.Apis.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs
  -samples\datastore\api\packages\Google.Apis.1.20.0\lib\net45\Google.Apis.PlatformServices.dll" /reference:"C:\Users\J
  effrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\Google.Cloud.Datastore.V1.1.0.0-beta06\lib\net45\Go
  ogle.Cloud.Datastore.V1.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\
  Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples
  \datastore\api\packages\Grpc.Auth.1.0.1\lib\net45\Grpc.Auth.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-
  docs-samples\datastore\api\packages\Grpc.Core.1.0.1\lib\net45\Grpc.Core.dll" /reference:"C:\Users\Jeffrey Rennie\gitr
  epos\dotnet-docs-samples\datastore\api\packages\log4net.2.0.3\lib\net40-full\log4net.dll" /reference:"C:\Program File
  s (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Microsoft.CSharp.dll" /reference:"C:\Program Fi
  les (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\mscorlib.dll" /reference:"C:\Users\Jeffrey Re
  nnie\gitrepos\dotnet-docs-samples\datastore\api\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll" /refere
  nce:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Core.dll" /reference
  :"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Data.DataSetExtensions.
  dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Data.dll
  " /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.dll" /refer
  ence:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\System.Interactive.Async.3.1.1\lib\
  net45\System.Interactive.Async.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETF
  ramework\v4.5.2\System.Net.Http.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NET
  Framework\v4.5.2\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFram
  ework\v4.5.2\System.Xml.Linq.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\pack
  ages\Zlib.Portable.Signed.1.11.0\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll" /debug
  + /debug:full /filealign:512 /optimize- /out:obj\Debug\QuickStart.exe /ruleset:"C:\Program Files (x86)\Microsoft Visu
  al Studio 14.0\Team Tools\Static Analysis Tools\\Rule Sets\MinimumRecommendedRules.ruleset" /subsystemversion:6.00 /t
  arget:exe /utf8output QuickStart.cs Properties\AssemblyInfo.cs "C:\Users\Jeffrey Rennie\AppData\Local\Temp\.NETFramew
  ork,Version=v4.5.2.AssemblyAttributes.cs"
  Using shared compilation with compiler from directory: C:\Program Files (x86)\MSBuild\14.0\bin
_CopyOutOfDateSourceItemsToOutputDirectory:
Skipping target "_CopyOutOfDateSourceItemsToOutputDirectory" because all output files are up-to-date with respect to th
e input files.
_CopyAppConfigFile:
Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
  Copying file from "obj\Debug\QuickStart.exe" to "bin\Debug\QuickStart.exe".
  QuickStart -> C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\QuickStart\bin\Debug\QuickStart.exe
  Copying file from "obj\Debug\QuickStart.pdb" to "bin\Debug\QuickStart.pdb".
Done Building Project "C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\QuickStart\QuickStart.csproj"
 (default targets).

Project "C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\Datastore.sln" (1) is building "C:\Users\Je
ffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\QuickStartTest\QuickStartTest.csproj" (5) on node 1 (default ta
rgets).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the i
nput files.
CoreCompile:
  C:\Program Files (x86)\MSBuild\14.0\bin\csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /d
  efine:DEBUG;TRACE /highentropyva+ /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\pack
  ages\Google.Api.CommonProtos.1.0.0-beta05\lib\net45\Google.Api.CommonProtos.dll" /reference:"C:\Users\Jeffrey Rennie\
  gitrepos\dotnet-docs-samples\datastore\api\packages\Google.Api.Gax.1.0.0-beta06\lib\net45\Google.Api.Gax.dll" /refere
  nce:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\Google.Api.Gax.Grpc.1.0.0-beta06\lib
  \net45\Google.Api.Gax.Grpc.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packag
  es\Google.Apis.Auth.1.20.0\lib\net45\Google.Apis.Auth.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-s
  amples\datastore\api\packages\Google.Apis.Auth.1.20.0\lib\net45\Google.Apis.Auth.PlatformServices.dll" /reference:"C:
  \Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\Google.Apis.Core.1.20.0\lib\net45\Google.Ap
  is.Core.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\Google.Apis.1.20
  .0\lib\net45\Google.Apis.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages
  \Google.Apis.1.20.0\lib\net45\Google.Apis.PlatformServices.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-d
  ocs-samples\datastore\api\packages\Google.Cloud.Datastore.V1.1.0.0-beta06\lib\net45\Google.Cloud.Datastore.V1.dll" /r
  eference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\Google.Protobuf.3.0.0\lib\net45
  \Google.Protobuf.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\Grpc.Au
  th.1.0.1\lib\net45\Grpc.Auth.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\pack
  ages\Grpc.Core.1.0.1\lib\net45\Grpc.Core.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datast
  ore\api\packages\log4net.2.0.3\lib\net40-full\log4net.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Mi
  crosoft\Framework\.NETFramework\v4.5.2\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\
  Microsoft\Framework\.NETFramework\v4.5.2\mscorlib.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-sampl
  es\datastore\api\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll" /reference:"C:\Users\Jeffrey Rennie\gi
  trepos\dotnet-docs-samples\datastore\api\QuickStart\bin\Debug\QuickStart.exe" /reference:"C:\Program Files (x86)\Refe
  rence Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Core.dll" /reference:"C:\Program Files (x86)\Referen
  ce Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Data.DataSetExtensions.dll" /reference:"C:\Program File
  s (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Data.dll" /reference:"C:\Program Files (
  x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.dll" /reference:"C:\Users\Jeffrey Rennie\gi
  trepos\dotnet-docs-samples\datastore\api\packages\System.Interactive.Async.3.1.1\lib\net45\System.Interactive.Async.d
  ll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Net.Http.
  dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Xml.dll"
   /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Xml.Linq.dll
  " /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\xunit.runner.visualstudio.2
  .1.0\build\net20\..\_common\xunit.abstractions.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\
  datastore\api\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\d
  otnet-docs-samples\datastore\api\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll" /reference:"C:\Us
  ers\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\xunit.extensibility.execution.2.1.0\lib\net45\
  xunit.execution.desktop.dll" /reference:"C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\packages\
  Zlib.Portable.Signed.1.11.0\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll" /reference:
  "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Collections.Conc
  urrent.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\
  System.Collections.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.
  5.2\Facades\System.ComponentModel.Annotations.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\
  Framework\.NETFramework\v4.5.2\Facades\System.ComponentModel.dll" /reference:"C:\Program Files (x86)\Reference Assemb
  lies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.ComponentModel.EventBasedAsync.dll" /reference:"C:\Progr
  am Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Diagnostics.Contracts.dll
  " /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Dia
  gnostics.Debug.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\
  Facades\System.Diagnostics.Tools.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NE
  TFramework\v4.5.2\Facades\System.Diagnostics.Tracing.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Mic
  rosoft\Framework\.NETFramework\v4.5.2\Facades\System.Dynamic.Runtime.dll" /reference:"C:\Program Files (x86)\Referenc
  e Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Globalization.dll" /reference:"C:\Program Files
  (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.IO.dll" /reference:"C:\Program Fil
  es (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Linq.dll" /reference:"C:\Progra
  m Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Linq.Expressions.dll" /ref
  erence:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Linq.Para
  llel.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\Sy
  stem.Linq.Queryable.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4
  .5.2\Facades\System.Net.NetworkInformation.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Fra
  mework\.NETFramework\v4.5.2\Facades\System.Net.Primitives.dll" /reference:"C:\Program Files (x86)\Reference Assemblie
  s\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Net.Requests.dll" /reference:"C:\Program Files (x86)\Refere
  nce Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.ObjectModel.dll" /reference:"C:\Program Files
  (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Reflection.dll" /reference:"C:\Pro
  gram Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Reflection.Emit.dll" /r
  eference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Reflect
  ion.Emit.ILGeneration.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\
  v4.5.2\Facades\System.Reflection.Emit.Lightweight.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Micros
  oft\Framework\.NETFramework\v4.5.2\Facades\System.Reflection.Extensions.dll" /reference:"C:\Program Files (x86)\Refer
  ence Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Reflection.Primitives.dll" /reference:"C:\Pro
  gram Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Resources.ResourceManag
  er.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\Syst
  em.Runtime.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Faca
  des\System.Runtime.Extensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFr
  amework\v4.5.2\Facades\System.Runtime.InteropServices.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Mi
  crosoft\Framework\.NETFramework\v4.5.2\Facades\System.Runtime.InteropServices.WindowsRuntime.dll" /reference:"C:\Prog
  ram Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Runtime.Numerics.dll" /r
  eference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Runtime
  .Serialization.Json.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4
  .5.2\Facades\System.Runtime.Serialization.Primitives.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Mic
  rosoft\Framework\.NETFramework\v4.5.2\Facades\System.Runtime.Serialization.Xml.dll" /reference:"C:\Program Files (x86
  )\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Security.Principal.dll" /reference:"C:
  \Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.ServiceModel.Duplex
  .dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System
  .ServiceModel.Http.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.
  5.2\Facades\System.ServiceModel.NetTcp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framewo
  rk\.NETFramework\v4.5.2\Facades\System.ServiceModel.Primitives.dll" /reference:"C:\Program Files (x86)\Reference Asse
  mblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.ServiceModel.Security.dll" /reference:"C:\Program File
  s (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Text.Encoding.dll" /reference:"C
  :\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Text.Encoding.Exte
  nsions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\
  System.Text.RegularExpressions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETF
  ramework\v4.5.2\Facades\System.Threading.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Frame
  work\.NETFramework\v4.5.2\Facades\System.Threading.Tasks.dll" /reference:"C:\Program Files (x86)\Reference Assemblies
  \Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Threading.Tasks.Parallel.dll" /reference:"C:\Program Files (
  x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Threading.Timer.dll" /reference:"C:
  \Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Xml.ReaderWriter.dl
  l" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Facades\System.Xm
  l.XDocument.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Fac
  ades\System.Xml.XmlSerializer.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\QuickStartTest.dll /r
  uleset:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\\Rule Sets\MinimumRecomm
  endedRules.ruleset" /subsystemversion:6.00 /target:library /utf8output QuickStartTest.cs Properties\AssemblyInfo.cs "
  C:\Users\Jeffrey Rennie\AppData\Local\Temp\.NETFramework,Version=v4.5.2.AssemblyAttributes.cs"
  Using shared compilation with compiler from directory: C:\Program Files (x86)\MSBuild\14.0\bin
_CopyFilesMarkedCopyLocal:
  Copying file from "C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\QuickStart\bin\Debug\QuickStart
  .exe" to "bin\Debug\QuickStart.exe".
  Copying file from "C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\QuickStart\bin\Debug\QuickStart
  .pdb" to "bin\Debug\QuickStart.pdb".
_CopyOutOfDateSourceItemsToOutputDirectory:
Skipping target "_CopyOutOfDateSourceItemsToOutputDirectory" because all output files are up-to-date with respect to th
e input files.
_CopyAppConfigFile:
Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
  Copying file from "obj\Debug\QuickStartTest.dll" to "bin\Debug\QuickStartTest.dll".
  QuickStartTest -> C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\QuickStartTest\bin\Debug\QuickSt
  artTest.dll
  Copying file from "obj\Debug\QuickStartTest.pdb" to "bin\Debug\QuickStartTest.pdb".
Done Building Project "C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\QuickStartTest\QuickStartTest
.csproj" (default targets).

Done Building Project "C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api\Datastore.sln" (default targe
ts).

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.91
xUnit.net Console Runner (64-bit .NET 4.0.30319.42000)
  Discovering: QuickStartTest
  Discovered:  QuickStartTest
  Starting:    QuickStartTest
Saved sampletask1: Buy milk
  Finished:    QuickStartTest
  Discovering: DatastoreTest
  Discovered:  DatastoreTest
  Starting:    DatastoreTest
    GoogleCloudSamples.DatastoreTest.TestRunProjectionQuery [SKIP]
      https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/304
    GoogleCloudSamples.DatastoreTest.TestDistinctOnQuery [SKIP]
      https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/346
    GoogleCloudSamples.DatastoreTest.TestEqualAndInequalityRange [SKIP]
      https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/304
    GoogleCloudSamples.DatastoreTest.TestMultiSort [SKIP]
      https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/304
    GoogleCloudSamples.DatastoreTest.TestDistinctQuery [SKIP]
      https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/346
    GoogleCloudSamples.DatastoreTest.TestProjectionQuery [SKIP]
      https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/304
    GoogleCloudSamples.DatastoreTest.TestInequalitySort [SKIP]
      https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/304
    GoogleCloudSamples.DatastoreTest.TestBasicQuery [SKIP]
      https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/304
  Finished:    DatastoreTest
=== TEST EXECUTION SUMMARY ===
   DatastoreTest   Total: 55, Errors: 0, Failed: 0, Skipped: 8, Time: 58.600s
   QuickStartTest  Total:  1, Errors: 0, Failed: 0, Skipped: 0, Time:  2.981s
                          --          -          -           -        -------
             GRAND TOTAL: 56          0          0           8        61.581s (62.730s)
PS C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api>
jskeet commented 7 years ago

Does gcloud auth list also include gcloud auth application-default? What happens if you run gcloud auth application-default print-access-token? It seems more likely that auth details are coming from somewhere we're not expecting than that they're genuinely working with no auth information anywhere.

Rather than running the tests, it may be worth having a minimal app that just calls GoogleCredential.GetApplicationDefaultAsync().Result and looks at that return value.

SurferJeffAtGoogle commented 7 years ago
PS C:\Users\Jeffrey Rennie\gitrepos\dotnet-docs-samples\datastore\api> gcloud auth application-default print-access-token
ya29.REDACTED....

Ok. This is a usability issue in gcloud.