mirror of
https://github.com/brutaldev/StrongNameSigner.git
synced 2026-04-25 11:26:04 +03:00
[GH-ISSUE #93] Keyset does not exist error when using custom SNK generated from PFX file #76
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @brutaldev on GitHub (Jan 24, 2023).
Original GitHub issue: https://github.com/brutaldev/StrongNameSigner/issues/93
https://improveandrepeat.com/2018/12/how-to-fix-the-keyset-does-not-exist-cryptographicexception/
That file is generated via the following:
i.e. the ###.pfx file is not installed in either the developers machine or the build agent.
When running a clean build - only the Step 5
Failed ...error is displayed.So I assume Step 7 is due to the files already being signed (by this tool)
Originally posted by @Smurf-IV in https://github.com/brutaldev/StrongNameSigner/issues/92#issuecomment-1401526093
@brutaldev commented on GitHub (Jan 24, 2023):
@Smurf-IV That does not generate a valid strong name signing key depending on the certificate you are using. The toll will simply extract the public key but that does not mean it's a valid public key pair that can be used for strong-naming. If you try to use that key in Visual Studio it will not sign your binaries either so this is not a bug in the tool since it's just reporting the problem to you, the
Keyset does not existand it's not a valid signing key.Visual Studio: `Error signing output with public key from file '..\DelaySign.snk' -- Invalid public key.
Step 7 is saving all the changes made to the IL to disk and validating the assembly. When it gets signed with a faulty key then it will not save because it does not generate a valid strong-name.
@brutaldev commented on GitHub (Jan 24, 2023):
@Smurf-IV Why are you trying to use SN.exe to do this anyway? Rather use the tool itself with your PFX file directly and provide the password during signing. It knows (better than SN.exe) how to use the public key in the certificate to generate a key-pair sign the assemblies.
@Smurf-IV commented on GitHub (Jan 26, 2023):