Hi,
My tool is running in a .NET4.0 environment but reads and writes
a .NET 2.0 assembly.

I am adding new classes and methods to the assembly. At one place I am
emitting a call to Object.MemberWiseClone(). To get the method I am
calling:

var method =
moduleDefinition.Import(moduleDefinition.ResolveMethod(typeof(object),
"MemberwiseClone", null));

The result is an Object.MemberWiseClone() from mscorlib 4.0 and not
mscorlib 2.0. If I look at the references of the generated assembly I
have an additional reference to mscorlib 4.0.

How can i avoid this?

Jan

-- 
--
mono-cecil

Reply via email to