我使用以下语句创建了一个拉取请求:
pullRequest = gitClient.CreatePullRequestAsync(gitPullRequest, shrdRepo.Id,
supportsIterations: true, cancellationToken: token).Result;
我正在尝试添加审阅者和工作项。 对于审阅者,添加尝试使用以下语句来标识审阅者。但我遇到一个例外:
IdentityHttpClient identityHttpClient = new IdentityHttpClient(new Uri(c_collectionUri), creds);
IdentitiesCollection identitiesPerAlias = identityHttpClient.ReadIdentitiesAsync(IdentitySearchFilter.MailAddress, mail, cancellationToken:token).Result;
例外是:
Exception when looking for vsts identity for alias xyzxyz.com. System.AggregateException: One or more errors occurred. ---> Microsoft.VisualStudio.Services.WebApi.VssResourceNotFoundException: API resource location 28010c54-d0c0-4c89-a5b0-1c9e188b9fb7 is not registered on https://dev.azure.com/xyz.
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<CreateRequestMessageAsync>d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Identity.Client.IdentityHttpClient.<ReadIdentitiesAsyncInternal>d__42.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at AzureDevOpsSample.Program.<SearchForReviewerVstsIdentity>d__4.MoveNext() in D:\Projects\tools_release_notes\tools-ReleaseNotes_PR_Working\createPrForSharedRepo\Program.cs:line 349
---> (Inner Exception #0) Microsoft.VisualStudio.Services.WebApi.VssResourceNotFoundException: API resource location 28010c54-d0c0-4c89-a5b0-1c9e188b9fb7 is not registered on https://dev.azure.com/xyz.
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<CreateRequestMessageAsync>d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Identity.Client.IdentityHttpClient.<ReadIdentitiesAsyncInternal>d__42.MoveNext()<---
有人可以建议我确定审阅者并添加工作项以拉出请求吗?