Question

I want to sign one assembly in my project (to be used by another team). From my experience, soon I will need to sign other projects too and I want to sign them all with one file.

I have done the following:

  • Right click on my project, go to properties, go to "Signing" tab, checked "Sign the assembly" check-box, entered key file name (MyKey), clicked 'ok'.

my file (MyKey.snk) was saved inside the folder project.

  • I moved generated key file 1 level up, into solution folder;
  • opened 'Signing' tab again, and in 'Chose a strong name key file' selected file from new location;

and the MyKey.snk file was copied into project folder.

Is this ok? Can I prevent key file from copying into project folder?

Thanks a lot.

P.S. I work in VS 2008

Was it helpful?

Solution

I believe VS will always want to see the snk file in the project, but it's fine if it's added as a linked file...

  1. Remove the snk that was copied into the project
  2. Right-click on the project in VS and pick Add > Existing Item...
  3. Browse to the solution's snk and from the Add button's menu select Add As Link
  4. Go to project properties Signing tab and you should be able to select the linked snk
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top