“File has a different computed hash than specified in manifest” error when signing the EXE

前端 未结 3 1548
故里飘歌
故里飘歌 2020-12-18 05:42

My ClickOnce installation fails with an error:

File, WindowsFormsProject.exe, has a different computed hash than specified in manifest.

3条回答
  •  孤城傲影
    2020-12-18 06:05

    You can configure the signing process of the assembly and the ClickOnce manifest from VisualStudio:

    1. Right click your project > properties > Signing.
    2. Check "Sign the ClickOnce Manifest" and select the certificate you want to use.
    3. Check "Sign the assembly" and select the certificate you want to use.
    4. Save all the changes and publish again.

    All these settings will be valid when you build using MsBuild.

    Note: You can generate your self-signed certificate from that screen if required.

    Note 2: Remember that you have TWO manifests "Application Manifest" and "Deployment Manifest" both must be signed with the same certificate.

    If you need to re-sign your manifests at any time after the build you can use Mage.exe.

提交回复
热议问题