Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing a .net Framework dll requires re-signing?

Tags:

c#

.net

gac

If we decompiled a .net framework dll (eg .System.Linq.Expressions.dll ) present in GAC, made some changes in IL and assembled it back do we need to re-sign it ?

like image 980
Ashley John Avatar asked Dec 21 '25 02:12

Ashley John


2 Answers

To be able to add an assembly to the GAC you need to sign it with a strong name. And you will not be able to sign it as Microsoft because you do not have their private key. This means that the recompiled assembly gets a new strong name which is different from the strong name of the original assembly.

like image 158
Martin Liversage Avatar answered Dec 22 '25 15:12

Martin Liversage


Yes.

One of the ideas behind signing an assembly is to prevent someone from tampering with it.

So, if you do change the assembly, it'll need to be re-signed.

like image 22
dcastro Avatar answered Dec 22 '25 14:12

dcastro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!