From 4cbb174983df7bb8acbf7e993242f3bedd51b0f0 Mon Sep 17 00:00:00 2001 From: arturfilar <129092941+arturfilar@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:45:20 -0600 Subject: [PATCH] Don't strong name sign for delay signing I found this as a major difference from ILMerge that causes some internal issues in our code. The change is to strong name sign the assembly only if it's not Delay Signed - that's ilmerge behavior. I'm pretty sure that should solve this issue https://github.com/gluck/il-repack/issues/290 --- ILRepack/Steps/SigningStep.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ILRepack/Steps/SigningStep.cs b/ILRepack/Steps/SigningStep.cs index 72eed5fc..ad12a6a7 100644 --- a/ILRepack/Steps/SigningStep.cs +++ b/ILRepack/Steps/SigningStep.cs @@ -67,9 +67,11 @@ public void Perform() } _repackContext.TargetAssemblyDefinition.Name.PublicKey = publicKey; _repackContext.TargetAssemblyDefinition.Name.Attributes |= AssemblyAttributes.PublicKey; - _repackContext.TargetAssemblyMainModule.Attributes |= ModuleAttributes.StrongNameSigned; if (!_repackOptions.DelaySign) + { + _repackContext.TargetAssemblyMainModule.Attributes |= ModuleAttributes.StrongNameSigned; KeyPair = snkp; + } } else {