I'm trying nuget caching in Azure Pipelines. On running the pipeline, I'm facing this error.
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
Other Info: Using Azure DevOps Server 2020 Update 1
The pipeline:
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'
I'm trying this on a .net framework project having installed Newtonsoft.json from Nuget.
Cache@V2 ansible task is the one failing with message "API resource location a7c78d38-31a8-417e-ba6b-7e58b352f304 is not registered on"
The query is whether this Cache@v2 task is supported on Azure DevOps Server 2020 Update 1 on-premise?
If yes, then what is the reason behind this error?
The Cache@2
task is not supported on-premises. It works on Azure DevOps, but it doesn't work on Azure DevOps On-Premise Server (source).