通过.Net SDK

时间:2015-11-06 08:54:08

标签: azure hdinsight

我尝试使用.Net SDK调试HDI群集。 tutorial非常自我解释,但是当我跟进时,我似乎错过了一个参考。

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Security;
using System.Text;
using System.Threading.Tasks;
using Hyak.Common;
using Microsoft.Azure;
using Microsoft.Azure.Common.Authentication;
using Microsoft.Azure.Common.Authentication.Models;
using Microsoft.Azure.Management.HDInsight;
using Microsoft.Azure.Management.HDInsight.Job;
using Microsoft.Azure.Management.HDInsight.Job.Models;
using Microsoft.Azure.Management.HDInsight.Models;
using Newtonsoft.Json;

namespace CreateHDICluster
{
    internal class Program
    {
        private static ProfileClient _profileClient;
        ....
    }
}

会产生'类型或命名空间名称' ProfileClient'找不到(你错过了使用指令或汇编引用吗?)'

最好的猜测,无论ProfileClient类所属的任何包的版本不再包含此类 - 教程都没有指定版本,其中一些包是预发布的。

有人有这个吗? ProfileClient类属于什么?

由于

2 个答案:

答案 0 :(得分:0)

这似乎是一个错误,因为您在项目中有正确的引用。注意开源的GitHub repo和ProfileClient的类定义:

https://github.com/Azure/azure-sdk-for-net/blob/21db6e5490e66af39a9c6dbf0ad10650d9ca037b/src/Authentication/Common.Authentication/Common/ProfileClient.cs

此文件存在于命名空间内:Microsoft.Azure.Common.Authentication

我建议向回购提交一个问题。另请注意,请求引入的包,特别是Microsoft.Azure.Common.Authentication在 预发布

答案 1 :(得分:0)

我相信您在文章示例中找到的这个问题是由于从身份验证包中删除了ProfileClient - 该文章的示例现已更新。

如果您仍然感兴趣,可以查看updated sample in the article

我希望这有帮助!

相关问题