Failed to find a valid digest in the ‘integrity’ attribute for resource in Blazor app

This is an annoying issue indeed and I’m getting that error every now and then. It seems to happen after updating some packages, and the build processes fails to pick up the new SHA for the package.

You can verify that this is the issue by finding the file containing the SHAs and compare the SHA for the dll in question with the SHA from the error message.
This file is called blazor.boot.json and is generated deep inside the obj-folder of your project folder.
(mine was here: obj\Release\net6.0\win-x86\PubTmp\Out\wwwroot\_framework)

If was the issue, please try this:

  1. Close VS.
  2. Delete the obj and bin folders from all your projects. (the web project might be enough, but hey – can’t hurt)
  3. Start VS
  4. Rebuild solution.
  5. Try Publish again.

Leave a Comment

tech