The proper way to sign a .net assembly

I am trying to sign a .net core lib and I'm just not sure if I did everything right

1) using VS Command Promp I called sn -k mykey.snk

2) copied mykey.snk to myproject folder

3) a key file has been added to project.json

 "frameworks": { "netstandard1.6": {} }, "buildOptions": { "outputName": "MyLib", "keyFile": "mykey.snk" } 

Is it correct that the library (dll) will be used both for the .net kernel and for full-fledged .net 4.6 applications?

+5
source share
1 answer

Yes, that is the right way. If you look at ASP.NET Core projects like Logging , you will find

 "buildOptions": { "keyFile": "../../tools/Key.snk" ... } 

in the project.json and Key.snk file in the Tools folder. You can also check .NET Core - strong name assemblies .

+3
source

All Articles