views:

128

answers:

2

I am attempting to edit some resources in another .NET executable, using reflection.

Is this possible/how would I do this? Or am I going down completely the wrong route?

A: 

It sounds like you may be heading down the wrong route. The CLR does not allow you to edit the metadata tables of any assemblies loaded into the current AppDomain. What is it that you are trying to do?

Andrew Hare
I'm actually trying to save a script into the resources of the exe, so it is basically a self-extracting file.
Marineio
+1  A: 

Reflexil is an assembly editor and runs as a plug-in for Reflector. Using Mono.Cecil, Reflexil is able to manipulate IL code and save the modified assemblies to disk. Reflexil also supports 'on the fly' C# and VB.NET code injection.

Markus Nigbur