Resources updating

M

Mikhail Shilkin

How can I update resources in exe assembly?
I need to update binary resources and .resx resource which contains some
string objects.

Thank you.

Mikhail
 
R

Richard Grimes [MVP]

Mikhail said:
How can I update resources in exe assembly?
I need to update binary resources and .resx resource which contains
some string objects.

Its not straightforward and the biggest issue is code signing. If your
assembly has a strong name (it has been signed) then you cannot change the
resources (linked or embedded) without resigning the assembly. If you merely
change the resource then the .NET assemblyy loader will refuse to load the
changed assembly because its hash does not reflect the hash created when it
was signed. There is an example in the .NET SDK called tlbgen that shows you
how to re-sign an assembly.

If the assembly is not signed then you can change a linked resource because
no check is made on its veracity, however, if you want to change an embedded
resource you will have to create a new assembly. Unfortunately I don't know
an easy way to do that because .NET embedded resources are part of the
metadata for the assembly. It should be possible since obsfuscators change
metadata (and other stuff in assemblies).

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top