“Manifest XML signature is not valid”

大城市里の小女人 提交于 2019-11-30 12:08:01

I had the same problem today. This is how I solved:

What caused the problem: We created a clickonce project using vs2012 and framework 4.5. Then we changed the target framework to 4.0 (client asked to).

The problem is: Framework 4.5 uses SHA-256 algorithm for the signature, and 4.0 uses SHA-1. When we changed the target framework to 4.0 and vs2012 didn't changed the algorithm.

Solution: Change the algorithm manually, generating a new certificate.

Go to Project properties -> signing

You will see the algorithm that is being used in 'Signature Algorithm'. You can create a new test certificate and then you will notice that it changes to 'sha1RSA'

Note, I would have added this as a comment, but due to silly Reputation rules, I can only add an answer!


Beware new code signing certificates

I had this problem recently because our Code Signing certificate needed renewal. So, being blind to the fact that Microsoft haven't patch the XP version of Framework 4 to work with SHA2 certificates during ClickOnce deployment, I told all my clickonce projects to use the new code signing certificate.

As I also do code-based updates of the app rather than just let Microsoft handle it, so that it's a more seamless experience to the end user without them required to press buttons and in the style of my app.

However, I hit a bug where my program didn't report the manifest error, instead it just hung (my bad!). In order to get an update our after working until 3am to discover this problem, I had to create a temporary certificate issued by Visual Studio. The problem with that? Code updates are not seamless any more because microsoft put a stupid dialog up as the publisher is unknown!

So my biggest concern is that yes, OK, XP is not supposedly supported from Monday but that shouldn't mean the Framework 4 shouldn't accept the new certificates if that's what they are pushing to everyone. Microsoft are even actively involved in that push!

The only working answer is as above, you MUST use Visual Studio to create an untrusted temporary certicate, which is rediculous!!! (I still have hope that maybe I didn't find the correct way to use the new certicate)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!