title: How to create a snk for .NETCore in Linux for Strong Named Assemblies
body: <p>I write .NETCore servers using CentOS 7 using the JetBrains Rider IDE.</p>
  
  <p>I need to create a bunch of <strong>strong named assemblies</strong> (library projects) for .NETCore 2.0. I know that on Windows I can use the <code>sn.exe</code> tool to create the <code>snk</code> key files. Can anybody elaborate a bit how to do this on a CentOS machine?</p>
  
  <p>I have found a mono binary also called <code>sn</code> (<a href="https://linux.die.net/man/1/sn" rel="nofollow noreferrer">see man page</a>) which seems to be the <code>sn.exe</code> equivilent but it seems to be pretty old (2003 / 2004) and I am not sure, if it is the tool one should use <strong>TODAY</strong>.</p>
  
  <p>Also I need to <strong>sign</strong> some DLLs with an <strong>official (from a commerial vendor) <code>code signing certificate</code></strong>. I do NOT understand the relation between a <code>snk</code> file and the certificate I got (it has a <code>p12</code> extension).</p>
  
  <p>From researching a little bit, I read, that in my <code>.csproj</code> file I need to add the following tags to advice <code>MSBUILD</code> to create strong named assemblies:</p>
  
  <pre><code>&lt;AssemblyOriginatorKeyFile&gt;MyKey.snk&lt;/AssemblyOriginatorKeyFile&gt;
  &lt;SignAssembly&gt;True&lt;/SignAssembly&gt;
  </code></pre>
  
  <p>I would greatly appreciate if someone could explain how to (on <strong>CentOS 7 targeting .NetCore 2.0</strong>):</p>
  
  <ol>
  <li><p>Create strong named assemblies</p></li>
  <li><p>Sign an assembly with an existing commercial certificate</p></li>
  </ol>
  
  <p>Please note that I am NOT using VisualStudio (where you have UI tools)!</p>