Strong Name Signing problem
eric-914
Posts: 46
I am having difficulty w/ this option, so I decided to start a brand new project from scratch to see if I could get it to work/fail.
1) I started a new VS2010 (C#) WPF project, called it SmartAssemblyTesting
2) I built this project in Release mode
3) I started a new SmartAssembly project, pointing the source to my .exe to the Release folder of my VS project.
4) I then pointed the destination to a different folder.
5) Now the only option I activated in S/A is the Strong Name Signing. I point it to a .PFX file, and enter the password.
6) All good so far, so I hit Build
7) I ran the .exe in the destination folder. Fail.
8 ) I rebuilt the S/A project w/ Self-Diagnostics
9) I re-ran the .exe in the destination folder. Fail.
It shows this message:
System.IO.FileLoadException: Could not load file or assembly 'SmartAssemblyTesting, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
There are no external dependencies (that are not defined in the GAC) for this project.
What am I doing wrong?
1) I started a new VS2010 (C#) WPF project, called it SmartAssemblyTesting
2) I built this project in Release mode
3) I started a new SmartAssembly project, pointing the source to my .exe to the Release folder of my VS project.
4) I then pointed the destination to a different folder.
5) Now the only option I activated in S/A is the Strong Name Signing. I point it to a .PFX file, and enter the password.
6) All good so far, so I hit Build
7) I ran the .exe in the destination folder. Fail.
8 ) I rebuilt the S/A project w/ Self-Diagnostics
9) I re-ran the .exe in the destination folder. Fail.
It shows this message:
System.IO.FileLoadException: Could not load file or assembly 'SmartAssemblyTesting, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
There are no external dependencies (that are not defined in the GAC) for this project.
What am I doing wrong?
Comments
I'm using the same .PFX file for all three cases. (Original signed + post-signed for the "real", post-signed for the "test")
This time the project worked. Uncheck the option and it breaks again.
Seems S/A should warn against this situation, but at least I have something to focus on now on my "real" project.
Fortunately, great article here shows how to fix that problem:
Signing an Unsigned Assembly
http://buffered.io/posts/net-fu-signing ... y-signing/
Now, w/ all .dlls signed, I could check the box, sign the assembly, and run S/A, and run the program.