Search code examples
c#vb.netgitignore

Strong Names Keyfile in .gitignore


I compile a library in C# and wonder whether I put the .snk file used to sign the library with a strong name in the .gitignore file or if I commit it to the repository?


Solution

  • Your question:

    Would it be better if others signed the lib with the same key and thus had the very same keyfile?

    That answer is subjective based on who has access to the code. Generally speaking, private keys should be kept private, so that one authoritative source is responsible for the "official" signed release, and I can't think of a good reason to violate this best-practice.

    Answer: no, private keys should not be put into your repository.