Shared Name Utility (sn.exe)

sn.exe guarantees unique names for shared components because these components will end up in the GAC. Each shared component is signed with a private key and published with the public key. The following table shows some common usages of sn.exe :

Option

Description

/?

This option displays more command-line help.

-d keycontainer

This option is used to remove the keycontainer from the CSP.

-I keyfile keycontainer

This option reads the key pair in keyfile and installs it in the key container keycontainer in the Cryptographic Service Provider (CSP).

-k keyfile

This option generates a new key pair and writes it to keyfile.

-v assembly

This option is used to verify the shared name in an assembly .

Get .Net Framework Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.