.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...
- run
ildasm.exe /out=first.il first.dll
(orfirst.exe
) - edit
first.il
, find .assembly extern block referencesecond.dll
- change public key token in block
- run
ilasm.exe first.il
producefirst.dll
(orfirst.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
Post a Comment