user189688
user189688

Reputation:

how to add a resource to assembly during runtime?

how i can insert a file to assembly at run-time? i want to capable the user to import his logo into my application. Who has a better idea?

Upvotes: 0

Views: 658

Answers (2)

Thomas Levesque
Thomas Levesque

Reputation: 292685

You can't modify an assembly programmatically (at least not easily), and especially not at runtime. The user logo should be in another file, perhaps an image file in the user profile directory (AppData)

Upvotes: 1

Henrik
Henrik

Reputation: 9945

If you assembly is loaded, i.e. at runtime, it's probably locked by the process, so you can't insert data into it.

You can generate a new assembly with the logo and load it when it's been generated.

Upvotes: 1

Related Questions