Search code examples
c#.netwindowsdependenciesstrongname

Strongly name three assemblies that reference each other


This is probably really easy, but I'm stumped (and I'm a noob with c#). I have 3 assemblies that reference each other (for example, registering for notification of a delegate method, or calling a public method), all of which compile fine until I try to sign them with a strong name. Then I can't compile any of them, since the other two don't have a strong name. What am I missing? I've created a strong name file for all three, but can't include the snk and compile them.


Solution

  • If you have created one snk file that you want to use on all three of them choose: Add Existing Item from the context menu on the projects.

    Browse to the snk file and then choose "Add as link" by clicking on the arrow next to the Add button.

    Then in your project properties make sure in the tab Signing check the "Sign the assembly" checkbox and then select the keyfile you just added to your project.

    That should do the trick.