I'm using Mono.Cecil to scan assemblies for possible uses of PInvoke, and 
I've noticed that *DllImportAttribute*, in particular, does not appear when 
it should.  

My simplified flow is as follows:

    var assemDef = AssemblyDefinition.ReadAssembly(assembly);
    var module = assemDef.Modules[0];
    var typeRefs = module.GetTypeReferences();

All the various type references are listed here, such as *Object*, 
*CompilerServices*, *DebuggableAttribute*, etc, but not *DllImportAttribute 
*when I know it's there.  It even shows up in .NET Reflector, but not in 
Mono-Cecil.  

I've worked around this by checking every *MethodDefinition.IsPInvokeImpl*, 
but it would be much easier to simply check for the *DllImportAttribute 
*reference. 
 I'm also worried that if that one attribute is skipped, maybe others are 
as well.

Thoughts?

-- 
-- 
--
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.

Reply via email to