You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That means in theory we shouldn't need Microsoft.Bcl.Async when using .NET 4.5 - which makes sense, as we've already got all the Task goodness (including Task.Run) in the BCL.
Now, Google.Apis.Auth depends on Google.Apis.Core, so that's how we used to get the task dependencies - transitively. (At least, that's my understanding...)
With 1.10.1-rc1, the following program:
using Google.Apis.Auth.OAuth2;classProgram{staticvoidMain(string[]args){varcredentials= GoogleCredential.GetApplicationDefaultAsync().Result;}}
crashes with:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at Google.Apis.Auth.OAuth2.DefaultCredentialProvider.CreateDefaultCredentialAsync()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Program.Main(String[] args) in C:\[...]\Program.cs:line 9
The Google.Apis.Auth.PlatformServices library contains a dependency on the Microsoft.Threading.Tasks.dll, apparently for Microsoft.Runtime.CompilerServices.ConfiguredTaskAwaitable.
Basically, it looks like we need another project for Google.Apis.Auth.PlatformServices for .NET 4.5 to avoid requiring that dependency. (Currently the DotNet40 assembly is copied into lib\net45 in the Google.Apis.Auth nuspec file.)
I haven't started doing any of this in case I've misunderstood - assigning to Matt for initial comments as least.
(As a workaround, clients can add an explicit dependency on Microsoft.Bcl.Async themselves.)
The text was updated successfully, but these errors were encountered:
Our nuspec file for Google.Apis.Core has the following dependencies:
That means in theory we shouldn't need
Microsoft.Bcl.Async
when using .NET 4.5 - which makes sense, as we've already got all theTask
goodness (includingTask.Run
) in the BCL.Now,
Google.Apis.Auth
depends onGoogle.Apis.Core
, so that's how we used to get the task dependencies - transitively. (At least, that's my understanding...)With 1.10.1-rc1, the following program:
crashes with:
The
Google.Apis.Auth.PlatformServices
library contains a dependency on theMicrosoft.Threading.Tasks.dll
, apparently forMicrosoft.Runtime.CompilerServices.ConfiguredTaskAwaitable
.Basically, it looks like we need another project for
Google.Apis.Auth.PlatformServices
for .NET 4.5 to avoid requiring that dependency. (Currently the DotNet40 assembly is copied into lib\net45 in the Google.Apis.Auth nuspec file.)I haven't started doing any of this in case I've misunderstood - assigning to Matt for initial comments as least.
(As a workaround, clients can add an explicit dependency on
Microsoft.Bcl.Async
themselves.)The text was updated successfully, but these errors were encountered: