Signing an unsigned assembly

后端 未结 4 2078
情话喂你
情话喂你 2021-02-13 23:28

The recent upgrade of NHibernate 2.1 has brought a mega headache situation to the surface.

It seems most of the projects build by default as signed assemblies. For e

4条回答
  •  暖寄归人
    2021-02-14 00:00

    All the given answers have a serious flaw in them - they do not work if there are more than one unsigned assemblies which depend on each other. You will have to edit the IL files manually to change unsigned references to signed ones. It is certainly possible, but error prone.

    There is a much better way. First, here are my sources:

    1. https://www.nuget.org/packages/Nivot.StrongNaming/1.0.4.2
    2. How to download a Nuget package without nuget.exe or Visual Studio extension?

    The first one is a link to a NuGet package called StrongNaming which allows to strongly name assemblies and it also takes care of unsigned references for you! The second one describes how to download NuGet packages without Visual Studio, if necessary.

    I, personally, used the Visual Studio to download it using the NuGet package manager itself, however, you can always browse directly to https://www.nuget.org/api/v2/package/Nivot.StrongNaming/1.0.4.2 and download the nivot.strongnaming.1.0.4.2.zip

    There is a tools folder in the downloaded zip (or package if NuGet was used). Once you have located it you can easily install it as a PowerShell module.

提交回复
热议问题