Is it possible to Add/Remove/Change an embedded resource in .NET DLL? -


is possible add/remove/change embedded resource in .net dll after has been compiled? if so, how done, , there gotchas?

edit:

i manually, automatically through script in post-build event.

there's no way in managed code. once resource has been embedded becomes part of assembly compiled msil code is.

however, you manually, suggested lucero, disassembling dll text file using ildasm, removing resource using text editor, , reassembling dll using ilasm.

here's example using dll single embedded text file:

1) decompile dll msil:

ildasm mylibrary.dll /out=mylibrary.il 

2) open resulting mylibrary.il file , remove .mresource section:

.mresource public mylibrary.myresource.txt {   // offset: 0x00000000 length: 0x0000000f   // warning: managed resource file mylibrary.myresource.txt created } 

3) reassemble dll modified mylibrary.il file:

ilasm mylibrary.il /dll 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -