proper way to sign .net core assembly

风格不统一 提交于 2019-12-07 00:04:20

问题


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

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

2) copied mykey.snk to myproject folder

3) in project.json added keyfile

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

is this correct, is the library (dll) going to be usable on both .net core and full .net 4.6 apps ?


回答1:


Yes, this is the correct way. If you look into any ASP.NET Core projects, like Logging, you will find

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

in project.json file, and Key.snk in Tools folder. You also may check .NET Core - strong name assemblies issue.



来源:https://stackoverflow.com/questions/38435086/proper-way-to-sign-net-core-assembly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!