I can use tools like "dumpbin" and "dll export" to see the public entrypoints ("exports") of standard win32 DLL's like Windows\SYSTEM32\GDI32.dll. But when I use these same tools on .Net DLLs all I see is something like
2000 .reloc 2000 .rsrc 48000 .text
I have a C#/.Net DLL that provides entrypoints to control an industrial process and I want to check its public entry points against our documentation to ensure completeness of the public documentation. What tool shows public entry points for a .Net DLL?
I've tried Jetbrains DotPeek, which does a complete decompile of our DLL into C# source code, but that's overkill because it shows EVERYTHING and doesn't seem to have a summary mode where it just reports out public entry points.
I assume that by "entry points" you mean "public classes and methods"
How about using the visual Studio object browser?
Just as a starting point only , how to list all public types from current assembly and list all public methods from them:
Assembly assembly = Assembly.GetExecutingAssembly();
var exports =
assembly.GetExportedTypes()
.SelectMany(type => type.GetMethods(BindingFlags.Instance | BindingFlags.Public)
.Select(member => new
{
type.FullName,
Member = member.ToString()
}))
.ToList();
But this omits nested classes, properties and should be probably extended in few ways to suit question needs.
If you don't have VS - I like ILSpy. Microsoft now publishes it at the app store .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.