Can I sign an assembly for which I do not have source code?

前端 未结 2 443
予麋鹿
予麋鹿 2021-02-07 10:37

I have received an assembly from a third party. I need to add it to the GAC, but it does not have a strong name. Is there any way for me to sign the assembly using my own key so

2条回答
  •  生来不讨喜
    2021-02-07 11:14

    Yes. You can use ILDASM to disassemble the assembly into CIL code, and use ILAsm to reassemble that CIL code and sign it with your own key.

    I've done this with various third-party assemblies, and it works just fine.

    The post .NET-fu: Signing an Unsigned Assembly (Without Delay Signing) explains in detail how to do this.

提交回复
热议问题