NuGet Error NU1403

 Package content hash validation failed for PackageId.13.0.1. The package is different than the last restore.

Issue

The content of the package in the global packages folder is different from the value in the lock file. The package on the source may have changed, or a multiple sources may have different instances of the same package id and version.

Solution

  • If you believe that the version you have installed locally is the up to date, correct one, run restore with the force evaluate option to update the lock file to the local version of the package.

  • Inspect the package in the global packages folder and determine the source from which it was installed. If you own the source in quesiton, you may need to ensure the correct version of the package is available. Once you have figured out which package version you want, run restore with force evaluate.

  • If none of the above fixes work, the package may have been tampered with before it made it to your machine.