[英]error CS0234: The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
I have installed Microsoft.azure.data nuget package in visual studio but I m getting below error- Program.cs(1,17): error CS0234: The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) below is my program code -我已经在 Visual Studio 中安装了 Microsoft.azure.data nuget 包,但出现以下错误 - Program.cs(1,17): error CS0234: The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (您是否缺少程序集参考?)下面是我的程序代码 -
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);
}
}
}
Install Microsoft.Azure.Kusto.Data nuget.安装 Microsoft.Azure.Kusto.Data nuget。 then it compiles for me.然后它为我编译。 It does give me authentication errors but not assembly reference errors.它确实给了我身份验证错误,但没有给我程序集引用错误。
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");
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.