.net - How to change the Public token of the assembly -


i have 2 assemblies. 1 assembly referring one. checked manifest of first assembly , found referencing second 1 specific token key.

but checked token of second assembly , found has different public token. somehow missed correct second assembly. want know there way can change second assembly's public token 1 first assembly needs.

also have second assembly has public token = null.

sounds want rebuild second assembly , sign different key, easy if had source guess don't?

i think easier rebuild first assembly references second assembly have, using public key token present on second assembly. easier, not entirely straightforward.

i think should able achieve running first assembly through ildasm.exe, change public key token on reference second assembly, , run result through ilasm.exe, produce new version of first assembly.

a rough outline of steps involved...

  1. run ildasm.exe /out=first.il first.dll (or first.exe)
  2. edit first.il , find .assembly extern block reference second.dll
  3. change public key token in block
  4. run ilasm.exe first.il produce first.dll (or first.exe)

be warned, haven't used these tools long time, , never manipulate public key tokens in way, have add ingenuity of own. on other hand, can't think of reason approach not work.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -