2017-03-13 102 views
1

我正在使用Youtube api v3并需要FileDataStore(Google.Apis.Util.Store.FileDataStore)。我有所有必要的使用指令和NuGet包,但我仍然得到“无法找到类型或名称空间名'FileDataStore”错误。UWP支持Google的FileDataStore吗?

相同的代码同时适用于Winforms和WPF。 UWP中不支持FileDataStore?有没有解决方法?

UserCredential credential; 
      using (var stream = new FileStream("client_secrets.json", FileMode.Open, FileAccess.Read)) 
      { 
       credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
        GoogleClientSecrets.Load(stream).Secrets, 
        // This OAuth 2.0 access scope allows for full read/write access to the 
        // authenticated user's account. 
        new[] { YouTubeService.Scope.Youtube }, 
        "user", 
        CancellationToken.None, 
        new FileDataStore(this.GetType().ToString()) 
       ); 
      } 

回答

1

Google .Net client library目前不支持UWP。

我们希望在v2发行版中支持UWP,但也遇到了一些问题。有关v2的详细信息,请参阅#787

我们没有针对本机/ UWP支持(包括#838)的具体时间表。这将是一个数周/月的问题。

+0

谢谢。我很惊讶UWP尚未得到支持。 –

+1

我们遇到了两个不同库之间向后兼容的问题。它列在要做的事情上,但我们没有时间框架支持。 – DaImTo