.netstrongnamesnk

Do I need a new .snk keyfile for each version of a strong named library?


If I strong name a class library with a .snk file, do I need to replace this .snk file with a new if I create a new version of the same library?


Solution

  • No. The class library assembly is signed with the public key from the SNK file.

    You can use the same SNK file for any and all assemblies you create. That way, target systems can be configured to allow a particular public key to be trusted (i.e. all of you assemblies). This can be done through Control Panel --> Administrative Tools --> .NET Configuration x.0.

    We have a company wide SNK that all assemblies are signed with the same SNK.