Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Signing an assembly in Visual Studio

I am trying to sign my assembly, but I am getting an error:

Error Unable to find manifest signing certificate in the certificate store.

This is what I did to start:

  • I right click on my project in Visual Studio
  • Click on Properties
  • Click on Signing
  • Click Sign the Assembly checkbox
  • Select New
  • I give it a name and password

But then when I go to compile my build, I get the error.

I then went to the .pfx file in my project directory, double clicked it and imported it into the certificate store (and entered the same password as when I created the certificate).

But I keep getting the same error when trying to build my project. I do not have the "Sign the ClickOnce manifests" selected as I am not using that feature.

How can I fix this problem?

I am using Visual Studio 2010 SP1.

like image 488
fraXis Avatar asked Sep 09 '11 18:09

fraXis


People also ask

What does signing an assembly mean?

Signing an assembly ensures that the consumer knows its origin and uniquely identifies the component. It makes the physical DLL file tamper-proof. This tutorial will step you through signing an assembly with a strong name key (SNK) in . NET.

What does signing a DLL do?

A digital signature is used to help authenticate the identity of the creator of digital information — such as documents, e-mail messages etc. — by using the cryptographic algorithms. When a . dll and/or .exe file is digitally signed by a signer, you can confirm the same from the said file's properties.

How do I know if assembly is signed?

Open the properties sheet for the . dll from Windows Explorer. If a tab "Digital Signatures" is shown, it's a signed assembly. If the tab is missing, it's unsigned.


1 Answers

I found what was causing my problem. I had to delete the following from my Visual Studio project file (.csproj):

<ManifestCertificateThumbprint>...</ManifestCertificateThumbprint><b
<ManifestKeyFile>...</ManifestKeyFile><
<GenerateManifests>...</GenerateManifests><
<SignManifests>...</SignManifests>

This fixed the problem, and I was able to compile by application.

like image 196
fraXis Avatar answered Oct 03 '22 16:10

fraXis