AssemblyDefinition.HasExportedTypes and AssemblyDefinition.ExportedTypes don't work? #108

Closed
opened 2012-09-03 03:46:32 -05:00 by kiinoo · 2 comments
kiinoo commented 2012-09-03 03:46:32 -05:00 (Migrated from github.com)

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?

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?
jbevain commented 2012-09-03 03:55:33 -05:00 (Migrated from github.com)

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.

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.
kiinoo commented 2012-09-04 04:47:29 -05:00 (Migrated from github.com)

@jbevain Thanks for your quick response!

@jbevain Thanks for your quick response!
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-jbevain/cecil#108
No description provided.