0

Using dnSpy assembly editor I modified a copyrighted IBM assembly (DLL). I fixed a bug in the source code. After compiling the code back to a DLL, I tried to install it into the GAC.

But during this, InstallAssembly threw the following error:

InstallAssembly failed with error -2146234299

Anyone knows what this means? Thanks for any help!

EDIT

On learn.microsoft.com I can see that -2146234299 means FusionErrorSignatureCheckFailed. So it is not possible for me to modify the DLL?

Ozkan
  • 3,880
  • 9
  • 47
  • 78

2 Answers2

2

I'm very glad you're not able to do this . This is exactly what's intended:

Assemblies deployed in the Global Assembly Cache must have a strong name. When an assembly is added to the Global Assembly Cache, integrity checks are performed on all files that make up the assembly. The cache performs these integrity checks to ensure that an assembly has not been tampered with, for example, when a file has changed but the manifest does not reflect the change.

Source: Global Assembly Cache

rickvdbosch
  • 14,105
  • 2
  • 40
  • 53
  • Do you know any workaround for this? (except raising a ticket at IBM). Like for example, editing on `IL` level? I know this is more 'hacking' but I just want to know if there is a way, because I found the bug in the IBM code and I'm really close to fix this... – Ozkan Jan 04 '19 at 09:46
  • 1
    What you _can_ do is write a wrapper for the IBM assembly you can use from your own code. This doesn't allow you to edit the IBM assembly, it _does_ enable you to modify the resulting behavior. Changing the IBM assembly that's installed in the GAC is **not** an option. – rickvdbosch Jan 04 '19 at 09:48
0

If you modify an assembly, its signature will no longer be valid.

You would have to create a new signature for it, but you won't be able to do that because you don't have access to the private key that IBM used when they created the original signature.

So I'm afraid you're out of luck.

mbj
  • 987
  • 5
  • 18