Hi jb,

i am stuck with the following problem and I hope that you can help me
out :) and that its an oversight..

the situation is the following:

i create a method, using the cecil datastructures methoddefinition,
instruction and so on and add it to a type.  in  this method i call a
method which is located in another assembly, so i add the
assemblynamereference to the module and use it for the instruction. so
far so good.
BUT! when adding the assemblynamereference, it gets an RID that is
already taken by another reference, so during the serialization
process, the references are sorted again (i guess) and the RID of the
reference changes.
now i have the following problem:
the reference in the operand of the call statement in the IL code
still references the old RID -> therefore referencing a wrong assembly
after serialization -> peverify cant find the called method in this
assembly and boom, nothing works anymore :) :(

is there something i have to do manually?

raph

-- 
--
mono-cecil

Reply via email to