To delay signing a shared assembly

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.