In order to be secure, companies generally have access to the private key only to a few. But when you develop and test assemblies, accessing these tightly protected private keys can be a bit of a problem. In view of this, the. NET Framework provides support for deferred signing (delayed signing), which is sometimes referred to as partial signing (partial signing). Delay signing allows you to generate a program using only the company's public key
Set, temporarily without the private key. Before you publish, sign with the private key
1, if you use the public key (extract the key file's public key), you must delay the signature, otherwise you cannot compile
2, using delayed signing, cannot be installed directly to the GAC, you must turn off the assembly's validation feature
3, use the private key to re-sign before publishing
4. Open the validation feature for this Assembly
Steps:
1, create a class library project
650) this.width=650; "title=" Sogou 20141210225845.png "src=" http://s3.51cto.com/wyfs02/M01/55/31/ Wkiol1siycycn04oaaaw1vjavg8264.jpg "alt=" Wkiol1siycycn04oaaaw1vjavg8264.jpg "/>
2. Create a public/private key pair using the strong Use tool (SN) (Use the VS command tool)
Sn-k mykey.snk
3, extract the public key (Mykeypub.snk for developers)
Sn-p mykey.snk mykeypub.snk
4. Turn off verification of signatures
SN-VR Timber.DelaySign.dll
5, the assembly can now be installed in the GAC
Gacutil-i Timber.DelaySign.dll
6, when the assembly is ready for deployment, it needs to be re-signed (signed with the private key)
Sn-r Timber.DelaySign.dll mykey.snk
7, don't forget to turn on authentication
Sn-vu Timber.DelaySign.dll
This article is from the "program Ape's Home--hunter" blog, please be sure to keep this source http://962410314.blog.51cto.com/7563109/1588513
To delay signing a shared assembly