【发布时间】:2020-03-31 20:02:34
【问题描述】:
我已经在 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);
}
}
}
【问题讨论】:
标签: c# azure azure-data-explorer