Hey, The best practice is not to use the System.Reflection overloads of ImportReference, but use the Cecil overloads for the exact version you want.
Jb On Fri, Aug 25, 2017 at 12:30 PM, John Smith <[email protected]> wrote: > I'm trying to import a reference to a class method from another assembly, > and that method has return value of a system type - i.e. int. When I'm > importing it using ImportReference (using a MethodInfo arg), it seems to > use a reference to mscorlib of the latest version installed in the system, > but the application that my code modifies references mscorlib of an older > version, so this results in a version conflict. > How can I make it use mscorlib of a specified version rather than the > latest one? > > -- > -- > -- > mono-cecil > --- > You received this message because you are subscribed to the Google Groups > "mono-cecil" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- -- mono-cecil --- You received this message because you are subscribed to the Google Groups "mono-cecil" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
