ClickOnce install

痴心易碎 提交于 2021-01-29 16:02:43

问题


I've been adding new functionality to a C# 4.0 WinForms application. The application has already been published into Live using ClickOnce and signed with a certificate.

So I need to create a new ClickOnce installation so it upgrades the previously installed version. But I've been told not to use the certificate to sign the manifest as the certificate is about to expire.

The problem I've got is it doesn't detect that a previous version is already installed, and installs a new installation (so the app is listed twice in the Add or Remove programs).

I don't know if it's because I'm building the ClickOnce on a different PC, or because I'm no longer signing the manifest but it doesn't upgrade. Can someone please tell me what I need to do to make my ClickOnce install upgrade from a previous ClickOnce install? Does a ClickOnce have a Product code like an MSI has?

Many thanks


回答1:


The certificate is part of the deployment's identity. Removing it changes the identity, which is why it installs side-by-side. Try signing it with ANY certificate, even if it's one that's going to expire, or a test certificate from Visual Studio. That should work.

Also note that if your certificate is going to expire, if you fill in the TimeStamp Server in the Signing tab (you can use http://timestamp.comodoca.com/authenticode), then if the certificate was not expired when you published the application, it will continue to work until you deploy a new version. Basically, ClickOnce says, "it was valid when they deployed it, so it's valid" even though the certificate has expired since then.




回答2:


After trying lots of different ways, it's not possible to create a ClickOnce upgrade to upgrade a signed ClickOnce install with an unsigned ClickOnce install.

Thank you for your reply Jaycee.



来源:https://stackoverflow.com/questions/18536219/clickonce-install

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