ClickOnce Setup instantly stops executing

这一生的挚爱 提交于 2020-01-25 10:58:07

问题


I've got a problem with a ClickOnce Setup and have absolutely no idea what I'm doing wrong...

I'm trying to publish a VSTO AddIn for Outlook 2013 using VS2012. However when I click on the Setup.exe created by the ClickOnce Publish the Setup shows the small installation window for about half a second and then instantly disappears again. This without showing any error message or generating any event log entries at all.

  • The ClickOnce manifest is signed with a test certificate (self-signed certificate).
  • The assembly is not signed. (However if I choose to sign it, nothing changes)
  • I'm publishing to the filesystem using CD or DVD-ROM as installation path (publishing to IIS results in the same problem)

Yesterday this had worked. Today it won't. Hadn't changed anything since then...

Has anyone an idea what I might be doing wrong?


回答1:


Finally found the answer... After many tries to reproduce the problem i noticed the following:

If I create a new project don't change anything but create manually a test certificate the published setup won't run, but if I don't change anything at all it works...

As ClickOnce creates a Certificate for signing the manifest I started comparing the differences between those certificates. Comes out: the hash algorithm has to be sha1

This certificate doesn't work. And the installer will abort without giving an hint about what's wrong:

This certificate works.

One might think that the Setup would give at least a hint about what might be wrong instead of just aborting.

I hope if someone else stumbles upon this issue this might help :)



来源:https://stackoverflow.com/questions/15270164/clickonce-setup-instantly-stops-executing

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