【问题标题】:.net youtube library integration.net youtube 库集成
【发布时间】:2016-03-28 15:01:47
【问题描述】:

在我的 web 应用程序上集成 youtube api 时遇到一些问题,我已经使用 Analytics spi 和这项工作,但是当我尝试添加 youtube 服务时出现此错误:

Il tipo 'Google.Apis.Services.BaseClientService' è definito in un assembly di cui manca il riferimento. Aggiungere un riferimento all'assembly 'Google.Apis, Version=1.10.0.25332, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab'.

这里是代码

    using Google.Apis;
using Google.Apis.Auth;


using Google.Apis.Services;
using Google.Apis.Analytics.v3;
using Google.Apis.Analytics.v3.Data;

using Google.Apis.YouTube.v3;
using Google.Apis.YouTube.v3.Data;

public class DashBoard 
    {


    protected ServiceAccountCredential credential = null;
    protected AnalyticsService analytics_service = null;
    protected YouTubeService youTube_service = null; 

.....

产生错误的行是这样的:protected YouTubeService.... 删除所有工作,添加这个我得到错误

我可以检查什么来找出错误?

【问题讨论】:

    标签: .net api youtube


    【解决方案1】:

    三点你需要检查,

    1. Google.Apis.Services.BaseClientService 的参考版本可能您尝试使用的参考版本与 youtube 数据 api 所需的版本不同

    2. 在 Google 开发者控制台中,启用 youtube 数据 api 的状态

    3. 通过 nuget 包管理器更新 Google Api 客户端库

    【讨论】:

      猜你喜欢
      • 2014-09-11
      • 2019-01-28
      • 2011-07-27
      • 1970-01-01
      • 1970-01-01
      • 2023-04-05
      • 2015-06-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多