Name
Sn.exe — Strong Name Utility
Synopsis
sn optionsDescription
Verifies assemblies and
their
key information. Also generates key files and manages Cryptographic
Service Provider (CSP) containers, which provide
a layer of abstraction over key storage and management. CSPs are
enumerated in the
HKLM\SOFTWARE\Microsoft\Cryptography\Defaults\Provider
registry key. See
GacUtil.exe
for an example of
signing an assembly.
Examples
Create a new key-pair:
C:\home>sn -k mykey.snk
Microsoft (R) .NET Framework Strong Name Utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Key pair written to mykey.snkAdd that key-pair to a container:
C:\home>sn -i mykey.snk MyContainer
Microsoft (R) .NET Framework Strong Name Utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Key pair installed into 'MyContainer'Extract the public key from the key in the container:
C:\home>sn -pc MyContainer pubkey.out
Microsoft (R) .NET Framework Strong Name Utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Public key written to pubkey.outOptions
-
-?,help Displays usage information and exits.
-
-c [csp] Sets the default CSP for your machine. With no arguments, resets the CSP to the default.
-
-dcontainer Deletes the specified key container.
-
-Dassembly1assembly2 Compares two assemblies and verifies that they differ only by signature.
-
-eassemblyfile Extracts an assembly’s public key into
file ...