Is there an easy way to sign a C++ CLI assembly in VS 2010?

前端 未结 6 1672
囚心锁ツ
囚心锁ツ 2020-12-30 00:18

Right now I am setting the Linker/Advanced/KeyFile option.

I am getting the \"mt.exe : general warning 810100b3: is a strong-name signed assembly and embedding

6条回答
  •  一生所求
    2020-12-30 01:08

    In my experience, the simplest way is to:

    1) Open the Visual Studio Command Prompt 2010 . Go to your project directory (it's the directory that contains your source files). Then type sn -k yourKeyName.snk .

    2) Open your project in visual studio 2010 and open up the AssemblyInfo.cpp file and add this line [assembly:AssemblyKeyFileAttribute("yourKeyName.snk")]; .

    3) Open up Project->Properties->Linker->Advanced. And in the "Key File" slot and put yourKeyName.snk. Also in the "Delay Sign" slot select Yes (\DELAYSIGN) .

    4) Build your project as normal.

提交回复
热议问题