Sunday, May 10, 2009

Signing assembly

Sy:-
sn [-q-quiet]
Options:-
-c []
Set/reset the name of the CSP to use for MSCORSN operations.
-d
Delete key container named .
-D
Verify and differ only by signature.
-e
Extract public key from into .
-i
Install key pair from into a key container named .
-k []
Generate a new key pair of the specified size and write it into .
-m [yn]
Enable (y), disable (n) or check (no parameter) whether key containers
are machine specific (rather than user specific).
-o []
Convert public key in to text file with comma separated
list of decimal byte values.
If is omitted, text is copied to clipboard instead.
-p
Extract public key from key pair in and export to .
-pc
Extract public key from key pair in and export to .
-Pb [yn]
Enable (y), disable (n) or check (no parameters) the CLR policy allowing
trusted applications to bypass strong name signature verification on their
assemblies.
-q
Quiet mode. This option must be first on the command line and will suppress
any output other than error messages.
-R[a]
Re-sign signed or partially signed assembly with the key pair in .
If -Ra is used, hashes are recomputed for all files in the assembly.
-Rc[a]
Re-sign signed or partially signed assembly with the key pair in the key
container named .
If -Rca is used, hashes are recomputed for all files in the assembly.
-Rh
Re-compute hashes for all files in the assembly.
-t[p]
Display token for public key in (together with the public key
itself if -tp is used).
-T[p]
Display token for public key of (together with the public key
itself if -Tp is used).
-TS
Test-sign signed or partially signed assembly with the key pair in
.
-TSc
Test-sign signed or partially signed assembly with the key pair in the key
container named .
-v[f]
Verify for strong name signature self consistency. If -vf is
specified, force verification even if disabled in the registry.
-Vl
List current settings for strong name verification on this machine.
-Vr [] []
Register for verification skipping (with an optional, comma
separated list of usernames for which this will take effect and an
optional test public key in ).
can be specified as * to indicate all assemblies or *, to
indicate that all assemblies with the given public key token. Public key
tokens should be specified as a string of hex digits.
-Vu
Unregister for verification skipping. The same rules for
naming are followed as for -Vr.
-Vx
Remove all verification skipping entries.
-?
-h
Displays this help text.

Ex:-
sn -R "aeembly name.dll" "keyfile.snk"

For more Info:-
http://msdn.microsoft.com/en-us/library/k5b5tt23.aspx
Post a Comment