Hello Evan,
I have create new application , and in my application there is only
one button and only this code below , test on many assembly , so i
don't think it is still reference somewhere.
private void button1_Click(object sender, EventArgs e)
{
var asm = AssemblyDefinition.ReadAssembly("test.exe");
TypeDefinition type =
asm.MainModule.GetType("test.Form1");
asm.MainModule.Types.Remove(type);
asm.Write("ccc.exe");
}
Thanks
On Jun 19, 11:57 am, Jb Evain <[email protected]> wrote:
> On Sat, Jun 19, 2010 at 12:53 PM, david khan <[email protected]> wrote:
> > Sorry i want to be more clarify, as i said all about "i cannot delete"
> > means "i cannot save after delete these items using
> > "asm.Write("ccc.exe");"
>
> As I said, it's because you blindly remove a type while it's still
> referenced somewhere in the assembly.
>
> --
> Jb Evain <[email protected]>
--
--
mono-cecil