222

I've got an Excel add-in project that was created a couple years back in Visual Studio 2008. It's got some changes to be made so I've upgraded to Visual Studio 2010 (the only IDE I am able to use). Not sure if this is causing the problem but it's background information.

When I check out the code and compile it I get the error, "Error 1 Unable to find manifest signing certificate in the certificate store."

Can anyone tell me what this means and how to fix it?

Andy Parsons
  • 2,229
  • 2
  • 14
  • 4

9 Answers9

261

You need to re-add that certificate to your machine or chose another certificate.

To choose another certificate or to recreate one, head over to the Project's properties page, click on Signing tab and either

  • Click on Select from store
  • Click on Select from file
  • Click on Create test certificate

Once either of these is done, you should be able to build it again.

CodeCaster
  • 147,647
  • 23
  • 218
  • 272
Sathyajith Bhat
  • 21,321
  • 22
  • 95
  • 134
138

I found this solution which solved the problem for me: Removing all entries in your *.csproj that fall into:

<manifestcertificatethumbprint>...</manifestcertificatethumbprint>
<manifestkeyfile>...</manifestkeyfile>
<generatemanifests>...</generatemanifests>
<signmanifests>...</signmanifests>
Wernight
  • 36,122
  • 25
  • 118
  • 131
  • 1
    This is necessary when then application used to be ClickOnce but is no longer (checkbox grayed out in Signing tab) – Dan Bechard Jan 05 '15 at 17:16
  • 1
    also worked for me. apparently there were some leftovers in the project file from some experimenting we did on it that had to be cleaned manually. BTW - I also had to remove the .snk file from the project. so for me it was: remove .snk, disable signing, edit the project file, reload project, and enable signing. – OSH Mar 29 '15 at 14:26
  • Apparently needed if you had ever checked ClickOnce and then switched to Sign Assembly. – Roland Jun 18 '15 at 11:02
  • Thanks, this worked for me as well. It successfully removed the checked checkbox that activates clickonce. One addition: when you are editing the .csproj, make sure you have your solution the cspro is part of UNLOADED because otherwise the clickonce will remain checked. – real_yggdrasil Aug 24 '15 at 08:46
  • 1
    This is the best answer. – Homam Dec 01 '15 at 07:33
  • 3
    Unchecking the "Signing the ClientOnce Manifest" doesn't always work. The solution is to remove the mentioned lines from your csproj files – nectar Feb 05 '16 at 11:07
  • That is a truly awful oversight on the part of the developers of VS, and a completely unintuitive solution. Still an issue in VS 2015 Update 2. – Michael Todd Apr 26 '16 at 20:48
99

A quick solution to get me going was to uncheck the "Sign the ClickOnce manifests" in: Project -> (project name)Properties -> Signing Tab

Rudy
  • 991
  • 6
  • 2
  • 1
    I had to uncheck both `Sign the ClickOnce manifests` and `Sign the assembly` check boxes under signing tab in project properties to get rid of the issue. I was not using any signing at all. – RBT Dec 11 '16 at 03:53
13

Adding new certificate resolved this issue for me. Properties page -> signing -> Click on Create test certificate

moglimcgrath
  • 357
  • 3
  • 5
13

When the project was originally created, the click-once signing certificate was added on the signing tab of the project's properties. This signs the click-once manifest when you build it. Between then and now, that certificate is no longer available. Either this wasn't the machine you originally built it on or it got cleaned up somehow. You need to re-add that certificate to your machine or chose another certificate.

Gardner
  • 939
  • 7
  • 6
  • 24
    "You need to re-add that certificate to your machine or chose another certificate." If you know how to add the certificate, then it would be very helpful to state the how in this thread or a link to the how in this thread. As is, you answer is only half an answer. –  Oct 19 '11 at 00:21
  • 1
    Project Properties page > `Signing` in vertical tabs > Click on `Create test certificate`. And don't forget to commit a new created file `You.Project_TemporaryKey.pfx` because `.pfx` files are [often ignored](https://stackoverflow.com/a/40915899/390940). – it3xl Oct 31 '17 at 16:25
  • I think this solution is the only one proper for Visula Studio Office projects. – it3xl Oct 31 '17 at 16:35
9

Make sure you commit .pfx files to repository.

I just found *.pfx in my default .gitignore. Comment it (by #) and commit changes. Then pull repository and rebuild.

ApceH Hypocrite
  • 1,093
  • 11
  • 28
3
  1. Delete these entries mentioned in this post: http://manfredlange.blogspot.ca/2008/03/visual-studio-unable-to-find-manifest.html.

  2. Also remove the .snk or .pfx files from the project root.

Don't forget to push these changes to GitHub, for Jenkins only pulls source from GitHub.

Jirong Hu
  • 2,315
  • 8
  • 40
  • 63
0

The issue of erroneous leftover entries in the .csproj file still occurs with VS2015update3 and can also occur if you try to change the signing certificate for a different one (even if that is one generated using the 'new' option in the certificate selection dropdown). The advice in the accepted answer (mark as not signed, save, unload project, edit .csproj, remove the properties relating to the old certificates/thumbprints/keys & reload project, set certificate) is reliable.

simon coleman
  • 349
  • 2
  • 5
0

I create a new key, I had to search the csproj for the old one and refactor it.

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140