API 资源位置 a7c78d38-31a8-417e-ba6b-7e58b352f304 未注册

API resource location a7c78d38-31a8-417e-ba6b-7e58b352f304 is not registered on

我正在尝试在 Azure Pipelines 中进行 nuget 缓存。在 运行 管道上,我遇到了这个错误。

Resolving key:
 - nuget                 [string]
 - "Windows_NT"          [string]
 - **/packages.lock.json [file pattern; matches: 1]
   - s\NugetPackage\NugetPackage\packages.lock.json --> C50B5A946B314B4828AFA48FEA20E6387F9159D2B6F286C5FFD55C6873971D2E
Resolved to: nuget|"Windows_NT"|5fUBmn2K3dE1mNtjhbzAPEcBDcZt1N92ZcpVdzKRIxs=
Getting a pipeline cache artifact with the following fingerprint: `nuget|"Windows_NT"|5fUBmn2K3dE1mNtjhbzAPEcBDcZt1N92ZcpVdzKRIxs=`.
##[error]API resource location a7c78d38-31a8-417e-ba6b-7e58b352f304 is not registered on https://[url]/[project]/.
Finishing: NuGet Cache

其他信息: 使用 Azure DevOps Server 2020 更新 1

管道:

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'
  NUGET_PACKAGES: ''

steps:
- task: NuGetToolInstaller@1
  displayName: 'NuGet tool installer'

- task: Cache@2
  displayName: 'NuGet Cache'
  inputs:
    key: 'nuget | "$(Agent.OS)" | **/packages.lock.json'
    path: '$(NUGET_PACKAGES)'
    cacheHitVar: 'CACHE_RESTORED'

我正在从 Nuget 安装 Newtonsoft.json 的 .net 框架项目上尝试此操作。

Cache@V2 ansible 任务失败并显示消息“API 资源位置 a7c78d38-31a8-417e-ba6b-7e58b352f304 未注册”

请问本地 Azure DevOps Server 2020 Update 1 是否支持此 Cache@v2 任务?

如果是,那么这个错误背后的原因是什么?

不支持 Cache@2 任务 on-premises。它适用于 Azure DevOps,但不适用于 Azure DevOps On-Premise 服务器 (source)。