Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/328.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 错误CS0234:类型或命名空间名称';Azure';命名空间中不存在';微软';(是否缺少程序集引用?)_C#_Azure_Azure Data Explorer - Fatal编程技术网

C# 错误CS0234:类型或命名空间名称';Azure';命名空间中不存在';微软';(是否缺少程序集引用?)

C# 错误CS0234:类型或命名空间名称';Azure';命名空间中不存在';微软';(是否缺少程序集引用?),c#,azure,azure-data-explorer,C#,Azure,Azure Data Explorer,我已在visual studio中安装了Microsoft.azure.data nuget软件包,但我发现以下错误- Program.cs(1,17):错误CS0234:命名空间“Microsoft”中不存在类型或命名空间名称“Azure”(是否缺少程序集引用?)下面是我的程序代码- using Microsoft.Azure.Kusto.Data; using System; namespace LensDashboradOptimization { class Program

我已在visual studio中安装了Microsoft.azure.data nuget软件包,但我发现以下错误- Program.cs(1,17):错误CS0234:命名空间“Microsoft”中不存在类型或命名空间名称“Azure”(是否缺少程序集引用?)下面是我的程序代码-

using Microsoft.Azure.Kusto.Data;
using System;
namespace LensDashboradOptimization
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            //var clusterUrl = "https://mykusto.kusto.windows.net";

            // replace 'WithAadUserPromptAuthentication' with your preferred method of authentication
            //var kcsb = new Kusto.Data.KustoConnectionStringBuilder(clusterUrl); 


            //Console.WriteLine(kcsb);
            // Read the first row from reader -- it's 0'th column is the count of records in MyTable
            // Don't forget to dispose of reader when done.

            var client = Kusto.Data.Net.Client.KustoClientFactory.CreateCslQueryProvider("https://help.kusto.windows.net/Samples;Fed=true");
            var reader = client.ExecuteQuery("StormEvents | count");
            Console.WriteLine(reader);
        }
    }
}

安装Microsoft.Azure.Kusto.Data nuget。然后它为我编译。它确实会给我身份验证错误,但不会给我程序集引用错误


using Kusto.Data.Net.Client;

namespace ConsoleApp2
{
    class Program
    {


        static void Main(string[] args)
        {

            var client = KustoClientFactory.CreateCslQueryProvider("https://help.kusto.windows.net/Samples");
            var reader = client.ExecuteQuery("StormEvents | count");
        }
    }
}

安装Microsoft.Azure.Kusto.Data nuget。然后它为我编译。它确实会给我身份验证错误,但不会给我程序集引用错误


using Kusto.Data.Net.Client;

namespace ConsoleApp2
{
    class Program
    {


        static void Main(string[] args)
        {

            var client = KustoClientFactory.CreateCslQueryProvider("https://help.kusto.windows.net/Samples");
            var reader = client.ExecuteQuery("StormEvents | count");
        }
    }
}

我不确定,您必须仔细阅读Kusto客户端身份验证。我希望你已经装好了。请在回答的帖子上做标记,如果它没有回答你的问题,我不确定,你必须仔细阅读Kusto客户端验证。我希望你已经装好了。如果回答了你的问题,请在回答的帖子上做标记