【发布时间】:2019-08-06 07:02:32
【问题描述】:
我在下面的代码中得到突出显示的问题
var restClient = RestClient.Configure()
.WithEnvironment(AzureEnvironment.AzureGlobalCloud)
.WithBaseUri("https://management.azure.com/")
.WithCredentials(creds)
.Build();
var message = new HttpRequestMessage(HttpMethod.Post, url);
// getting issue in below code
await restClient.Credentials.ProcessHttpRequestAsync(message, new System.Threading.CancellationToken(false));
错误:
找不到方法: 'System.Threading.Tasks.Task
1<Microsoft.Rest.ServiceClientCredentials> Microsoft.Rest.Azure.Authentication.UserTokenProvider.LoginByDeviceCodeAsync(System.String, System.String, Microsoft.Rest.Azure.Authentication.ActiveDirectoryServiceSettings, Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache, System.Func2)'。
我在下面引用了最新版本的dll
Microsoft.IdentityModel.Clients.ActiveDirectory --> 版本 4.3.0.0
【问题讨论】:
标签: c# .net azure .net-core azure-active-directory