I have my own debugger for .NET apps that uses IMetaDataImport
interface
When I call ResolveTypeRef
method, I always get NotImplementedException
.
The definition of ResolveTypeRef
is like this:
[ComImport]
[Guid("....")] //a valid GUID
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[CLSCompliant(false)]
public interface IMetaDataImport {
void ResolveTypeRef(
[ComAliasName("mdTypeRef")] mdToken tr,
[ComAliasName("REFIID")] ref Guid riid,
[ComAliasName("IUnknown**"), Out, MarshalAs(UnmanagedType.IUnknown)] out object ppIScope,
[ComAliasName("mdTypeDef*"), Out] out mdToken ptd
);
// ... other methods from IMetaDataImport
}
The method calling:
metadataImport.ResolveTypeRef(typeRefToken, ref metadataImportGuid, out metadataObject, out typeDefToken)
Typically, the method should resolve type System.Exception or System.SystemException.
The problem occured when I moved app from .NET 3.5 to .NET 4.
Thanks for the answers!