Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ClickOnce error after deploying -- has a different computed hash than specified in manifest

Afer deploying my VSTO add-in with ClickOnce, I get the following error message when trying to launch setup.exe:

File, Addin.resources.dll, has a different computed hash than specified in manifest.

Why is this happening? What can I do to fix this?

like image 721
スーパーファミコン Avatar asked Aug 21 '09 16:08

スーパーファミコン


People also ask

What is ClickOnce manifest?

A ClickOnce application manifest is an XML file that describes an application that is deployed using ClickOnce. ClickOnce application manifests have the following elements and attributes. Element. Description.

How do I debug ClickOnce?

Application APIs work only when an application is deployed with ClickOnce technology, the only way to debug them is to deploy the application using ClickOnce, attach to it, then debug it.


3 Answers

I was able to resolve this just by doing a clean build and publish. For some reason the manifest wasn't updated like it was supposed to.

like image 95
Timothy Strimple Avatar answered Sep 17 '22 13:09

Timothy Strimple


I'm using Visual Studio 2013 SP2, and am having the same issue.

Regularly, I will create a new release of our Excel Addin by Rebuilding the solution in VS, signing it, deploying it, but it is uninstallable.

ComputedHash

If I then quit Visual Studio, then run Visual Studio again, Rebuild and Redeploy, then it'll work without any problems. Which is fine... but, of course, it means each time I deploy, I need to check that the damn thing will install okay !

It's worrying that VS continues to build installables which quietly contain this issue.

There are plenty of articles mentioning this bug, errr, issue (some from 8 years ago !!), suggesting I need to "rebuild my manifest file", but why doesn't this happen automatically when a do Rebuild in Visual Studio..?

ClickOnce Deployment Issue

ClickOnce Deployment Error

like image 25
Mike Gledhill Avatar answered Sep 19 '22 13:09

Mike Gledhill


I know this is super old, but putting it here for anyone who comes by in search of an answer.

It is described on https://docs.microsoft.com/en-us/previous-versions/dd465291(v=vs.110)?redirectedfrom=MSDN. I'm adding the main commands here in case the page disappears.

You can add a few commands on your build server to resign the manifest. After publishing, execute each command inside the folder containing the manifest and the vsto, respectively.

mage -sign ExcelWorkbook.dll.manifest -certfile ExcelWorkbook_TemporaryKey.pfx

mage -update ExcelWorkbook.vsto -appmanifest "Application Files\Ex
celWorkbook_1_0_0_0\ExcelWorkbook.dll.manifest" -certfile "Application Files\ExcelWorkbook_1_0_0_0\ExcelWorkbook_TemporaryKey.pfx"
like image 40
Martin Ørding-Thomsen Avatar answered Sep 19 '22 13:09

Martin Ørding-Thomsen