FindTypeRef and EnumTypeRefs<p class=MsoPlainText style="margin:0in 0in 0pt"><span style="font-size:small;font-family:Consolas">I am seeing different results from FindTypeRef and EnumTypeRefs.<span style="">  </span>If for example I look for System.Object in a specific module I can always find it via EnumTypeRefs, but sometimes FindTypeRef fails while acessing through the same IMetaDataImport interface.<span style="">  </span>Is this a bug or known restriction or am I doing something wrong?</span></p> <p class=MsoPlainText style="margin:0in 0in 0pt"><span style="font-size:small;font-family:Consolas"> </span></p> <p class=MsoPlainText style="margin:0in 0in 0pt"><span style="font-size:small;font-family:Consolas">Thanks</span></p>© 2009 Microsoft Corporation. All rights reserved.Thu, 09 Jul 2009 13:19:25 Z2a6d8e9f-4b03-4694-b394-50a14dde92edhttp://social.msdn.microsoft.com/Forums/en-US/netfxtoolsdev/thread/2a6d8e9f-4b03-4694-b394-50a14dde92ed#2a6d8e9f-4b03-4694-b394-50a14dde92edhttp://social.msdn.microsoft.com/Forums/en-US/netfxtoolsdev/thread/2a6d8e9f-4b03-4694-b394-50a14dde92ed#2a6d8e9f-4b03-4694-b394-50a14dde92edkrt_4tfyhttp://social.msdn.microsoft.com/Profile/en-US/?user=krt_4tfyFindTypeRef and EnumTypeRefs<p class=MsoPlainText style="margin:0in 0in 0pt"><span style="font-size:small;font-family:Consolas">I am seeing different results from FindTypeRef and EnumTypeRefs.<span style="">  </span>If for example I look for System.Object in a specific module I can always find it via EnumTypeRefs, but sometimes FindTypeRef fails while acessing through the same IMetaDataImport interface.<span style="">  </span>Is this a bug or known restriction or am I doing something wrong?</span></p> <p class=MsoPlainText style="margin:0in 0in 0pt"><span style="font-size:small;font-family:Consolas"> </span></p> <p class=MsoPlainText style="margin:0in 0in 0pt"><span style="font-size:small;font-family:Consolas">Thanks</span></p>Thu, 02 Jul 2009 18:20:50 Z2009-07-02T18:20:50Zhttp://social.msdn.microsoft.com/Forums/en-US/netfxtoolsdev/thread/2a6d8e9f-4b03-4694-b394-50a14dde92ed#9304d3ab-17b9-452f-8fe3-088a52f8d11ehttp://social.msdn.microsoft.com/Forums/en-US/netfxtoolsdev/thread/2a6d8e9f-4b03-4694-b394-50a14dde92ed#9304d3ab-17b9-452f-8fe3-088a52f8d11eKarel Zikmundhttp://social.msdn.microsoft.com/Profile/en-US/?user=Karel%20ZikmundFindTypeRef and EnumTypeRefsCheck the resolution scope you are passing to FindTypeRef. Is it AssembyRef of mscorlib.dll? Try to log it form your app and compare it with output from &quot;ildasm /met Your.dll /out=Your.il&quot;. Also check that there are not nasty surprises like 2 references to different versions of mscorlib.dll in the image you are openenig.<br/><br/>-KarelThu, 02 Jul 2009 20:13:30 Z2009-07-02T20:13:30Z