在使用sn.exe /tp选项之前,你应该先执行这一步:
sn /p test.snk public.snk
/k选项是用来生成保存公钥和私钥的文件,而/tp是用来显示公钥的,你的输入文件只能是包含公钥的文件。
MSDN这样说:
Displays the token for the public key stored in infile. The contents of infile must be a public key previously generated from a key pair file using -p. Do not use the -t[p] option to extract the token directly from a key pair file.