AssemblyDefinition.HasExportedTypes and AssemblyDefinition.ExportedTypes don't work? #108
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
I created a very simple dll, with a class in it:
public class TNamespace
{
public string Name { get; set; }
}
But when I'm calling the following code:
var assd = AssemblyDefinition.ReadAssembly(dllFile);
Console.WriteLine(assd.MainModule.HasExportedTypes);
it writes "False"
is it a bug?
No, it's not a bug. Have a look at the .Types member to have a look at the types inside the module. Please have a look at the ECMA 335 if you want to learn about what exported types mean in the context of an assembly.
You'd figure that Cecil wouldn't be so widely used if it wasn't able to read a single type from an assembly.
@jbevain Thanks for your quick response!