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