Google bigquery 你能不能提供-googlebigquery依赖最新的dotnetnuget包名,因为Bigquery示例程序不工作

Google bigquery 你能不能提供-googlebigquery依赖最新的dotnetnuget包名,因为Bigquery示例程序不工作,google-bigquery,google-api-dotnet-client,Google Bigquery,Google Api Dotnet Client,需要帮助才能得到 Google Bigquery dependency最新的Dotnet NUGET包名,因为Bigquery示例程序不工作,并且它在IAAuthorizationState提供dependency引用期望值 eError 1 The type 'DotNetOpenAuth.OAuth2.IAuthorizationState' exists in both 'c:\Echelon\GoogleDownloads\google-api-dotnet-client-1.8.

需要帮助才能得到 Google Bigquery dependency最新的Dotnet NUGET包名,因为Bigquery示例程序不工作,并且它在IAAuthorizationState提供dependency引用期望值

eError  1   The type 'DotNetOpenAuth.OAuth2.IAuthorizationState' exists in both 'c:\Echelon\GoogleDownloads\google-api-dotnet-client-1.8.1.source\Src\GoogleApis.Authentication.OAuth2.Tests\bin\Release\DotNetOpenAuth.dll' and 'c:\Users\Srinivasa\Documents\Visual Studio 2013\Projects\BigQueryConsole1\packages\DotNetOpenAuth.OAuth2.Client.4.3.4.13329\lib\net40-full\DotNetOpenAuth.OAuth2.Client.dll'  c:\users\srinivasa\documents\visual studio 2013\Projects\BigQueryConsole1\BigQueryConsole1\Program.cs   37  24  BigQueryConsole1




  using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using DotNetOpenAuth.OAuth2;
using Google.Apis.Authentication.OAuth2;
using Google.Apis.Authentication.OAuth2.DotNetOpenAuth;

using Google.Apis.Bigquery.v2;
using Google.Apis.Util;

namespace BigQueryConsole1
{
    class Program
    {
        public static void Main(string[] args)
        {
            // Register an authenticator.
            var provider = new NativeApplicationClient(GoogleAuthenticationServer.Description);

            // Put your client id and secret here (from https://developers.google.com/console)
            // Use the installed app flow here.
            provider.ClientIdentifier = "asdfasd";
            provider.ClientSecret = "asdfasdf";

            // Initiate an OAuth 2.0 flow to get an access token
            var auth = new OAuth2Authenticator<NativeApplicationClient>(provider, GetAuthorization);

            // Create the service.
            var service = new BigqueryService(auth);

            // Do something with the BigQuery service here
            // Such as... service.[some BigQuery method].Fetch();
        }

        private static IAuthorizationState GetAuthorization(NativeApplicationClient arg)
        {
            // Get the auth URL:
            IAuthorizationState state = new AuthorizationState(new[] { BigqueryService.Scopes.Bigquery.GetStringValue() });
            state.Callback = new Uri(NativeApplicationClient.OutOfBandCallbackUrl);
            Uri authUri = arg.RequestUserAuthorization(state);

            // Request authorization from the user (by opening a browser window):
            Process.Start(authUri.ToString());
            Console.Write("  Authorization Code: ");
            string authCode = Console.ReadLine();
            Console.WriteLine();

            // Retrieve the access token by using the authorization code:
            return arg.ProcessUserAuthorization(authCode, state);
        }
    }
}   
eError 1类型“DotNetOpenAuth.OAuth2.IAuthorizationState”存在于“c:\Echelon\GoogleDownloads\google-api-dotnet-client-1.8.1.source\Src\GoogleApis.Authentication.OAuth2.Tests\bin\Release\DotNetOpenAuth.dll”和“c:\Users\Srinivasa\Documents\visualstudio”中2013\Projects\BigQueryConsole1\packages\DotNetOpenAuth.OAuth2.Client.4.3.4.13329\lib\net40 full\DotNetOpenAuth.OAuth2.Client.dll'c:\users\srinivasa\documents\visualstudio 2013\Projects\BigQueryConsole1\BigQueryConsole1\Program.cs 37 24 BigQueryConsole1
使用制度;
使用System.Collections.Generic;
使用System.Linq;
使用系统文本;
使用DotNetOpenAuth.OAuth2;
使用Google.api.Authentication.OAuth2;
使用Google.api.Authentication.OAuth2.DotNetOpenAuth;
使用Google.api.Bigquery.v2;
使用Google.api.Util;
命名空间BigQueryConsole1
{
班级计划
{
公共静态void Main(字符串[]args)
{
//注册验证器。
var provider=new NativeApplicationClient(GoogleAuthenticationServer.Description);
//在此处输入您的客户id和密码(从https://developers.google.com/console)
//在此处使用已安装的应用程序流。
provider.ClientIdentifier=“asdfasd”;
provider.ClientSecret=“asdfasdf”;
//启动OAuth 2.0流以获取访问令牌
var auth=新的OAuth2Authenticator(提供者,GetAuthorization);
//创建服务。
var服务=新的BigqueryService(auth);
//在这里对BigQuery服务进行一些操作
//例如…服务。[某些BigQuery方法].Fetch();
}
私有静态IAAuthorizationState GetAuthorization(NativeApplicationClient参数)
{
//获取身份验证URL:
IAAuthorizationState=new AuthorizationState(新[]{BigqueryService.Scopes.Bigquery.GetStringValue()});
state.Callback=新Uri(NativeApplicationClient.OutOfBandCallbackUrl);
Uri authUri=arg.RequestUserAuthorization(状态);
//请求用户授权(通过打开浏览器窗口):
Process.Start(authUri.ToString());
控制台。写入(“授权代码:”);
字符串authCode=Console.ReadLine();
Console.WriteLine();
//使用授权代码检索访问令牌:
返回参数ProcessUserAuthorization(authCode,state);
}
}
}   

您正在使用旧版本的库

最新的NuGet软件包在以下位置提供:

查看我们的Google API示例(遗憾的是,我们没有BigQuery示例)

你也应该看看我们的,更具体地说,在

祝你好运

[更新] 我们显著改进了OAuth2.0库。请查看我们的博客公告 2013年10月-。
在我上面提到的OAuth2.0页面中,有关于如何设置应用程序以使用Google授权的确切细节。该库支持Windows Phone、Windows 8应用程序和常规.NET 4.0及更高版本中的OAuth 2.0流。

您好,谢谢您的回复,但我仍然收到相同的错误。尽管我已经使用了提到的NUGET软件包……您能告诉我“使用DotNetOpenAuth.OAuth2;”&&&“需要使用哪些nugget软件包吗使用Google.api.Authentication.OAuth2.DotNetOpenAuth;'IAuthorizationState的参考是什么?你能帮我从C#.net获取一个大型查询示例的代码吗?得到了答案,现在一切都按预期进行,谢谢:)