Search code examples
visual-studio-2012vstoclickonceadd-in.net-4.5

ClickOnce Setup instantly stops executing


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?


Solution

  • 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:

    SHA256 Certificate

    This certificate works.

    SHA1 Certificate

    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 :)