visual-studionugetvisual-studio-2019nuget-packagenuget-package-restore

NuGet hash validation failed NU1403


I have a solution and it is working on other developer's laptops, but on one by some reason during build, I see this error:

Error NU1403 Package content hash validation failed for Lucene.Net.Contrib.3.0.3. The package is different than the last restore.

Build fails for this reason.

In the packages folder I see the correct Lucene.Net.Contrib.3.0.3, what could be a reason for it and how to fix?


Solution

  • Cleaning up the global package folder fixed this issue. The path is %userprofile%\.nuget\packages