How to set PublicKeyToken of assembly

Viewed 824

Is there any way to set specific PublicKeyToken to assembly. In properties of project I can set version and package Id but I couldn't find the way to set PublicKeyToken :

Project properties

1 Answers

To set the public key token, you need to add a strong-name to the assembly, on the Signing tab:

enter image description here

It is this that defines the public key. If you need to use a specific public key, then you'll need the keys that go with that, or you'll have to delay-sign it on a build server (which takes longer to explain).

Related