How to add a resource to an existing signed assembly

Given: - assembly (for example, "SomeLib.dll") - text file (for example, "myconfig.xml")

I need to insert myconfig.xml file into an existing SomeLib.dll assembly

Please think before you click "Answer": I know about embedding resources at compile time (csc.exe ../ embedresource: file ...).

The fact is that I need to embed the resource after the build .

Is it possible?

I also know about ILMerge. But he did not find how this could help.

+3
source share
4 answers

Cecil : , , .

+1

. .

> al.exe SomeLib.module /out:SomeLib.dll /keyfile:SomeLib.snk /embed:myconfig.xml
0

You may be able to use Resource Hacker to automate modifying an assembly from the command line (examples on how to automate are included in their tutorial). After the change, you just need to leave the build post.

0
source

Source: https://habr.com/ru/post/1707007/


All Articles