Open jozefizso opened 4 years ago
In theory, you should be able to try clearing the Pipelines cache. For some reason, it may have gotten polluted by someone by using an older version of NuGet that used a buggy LZMA algorithm for hashing. You might even consider disabling the Pipelines cache altogether.
Can you try one of these strategies and let me know if that works for you?
We are using the latest nuget.exe v5.7 locally and on Azure Pipeline. Cache was not polluted by older nuget release.
You might even consider disabling the Pipelines cache altogether.
It takes extremely long time to restore packages using nuget. Therefore we are caching them.
@jozefizso
Can you try clearing your global packages folder and regenerating your packages.lock.json file locally?
NuGet product used: nuget.exe
NuGet version: 5.7.0 x64
VS version (if appropriate): Visual Studio 2019 16.7.3
OS version (i.e. win10 v1607 (14393.321)): Windows 10 2004 x64, Azure Hosted Agent 20200827.1
Detailed repro steps so we can see the same problem
PackageReference
formatRestorePackagesWithLockFile
andDisableImplicitNuGetFallbackFolder
in project filespackages.lock.json
filesnuget.exe
to restore packages in Azure Pipeline buildNU1403: Package content hash validation failed for System.Diagnostics.Debug.4.3.0
error message.Other suggested things
http://thecodemanual.pl/2020/03/11/caching-not-only-nuget-packages-on-azure-devops.html https://rafaeldossantos.net/azure-devops-pipeline-cache-nuget/
Verbose Logs
Full log file: nuget_restore.txt
We use this
NuGet.config
file:Sample Project
Unfortunately we don't have sample project, but this is easily reproducible when configuring Azure Pipelines with caching and nuget package restore for C# projects.