mirror of
https://github.com/brutaldev/StrongNameSigner.git
synced 2026-04-25 11:26:04 +03:00
[GH-ISSUE #99] Determinism? #80
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 @KirillOsenkov on GitHub (Aug 26, 2024).
Original GitHub issue: https://github.com/brutaldev/StrongNameSigner/issues/99
I think I'm seeing the public key token of the assemblies signed by StrongNameSigner differ across builds.
Could you please point me to the source where the key pair is generated?
I'm wondering if we could make it deterministic, e.g. derive the public key token from the SHA hash of the assembly name.
Would be nice to have it deterministic and not change across builds (always same public key token for the same assembly) because this way you can add a binding redirect to the app.config and specify the public key token.
Thanks!
@brutaldev commented on GitHub (Aug 26, 2024):
Hi @KirillOsenkov
If you do not specify a key file to use, then one is generated each time you run it.
If you are using the console application, use the
-kargument with a path to your own key file.If you are using the build task, then you can set the
$(StrongNameKeyFile)variable for the MSBuild target.To generate a strong name key file, follow the steps highlighted here: https://learn.microsoft.com/en-us/dotnet/standard/assembly/create-public-private-key-pair
You can also use your own PFX file if you are signing your own assemblies that way.
@KirillOsenkov commented on GitHub (Aug 26, 2024):
Thanks!