Assembly listing Tool

So my submission in gotdotnet.com sample finally gets approved. Here is the link to download it.

https://www.gotdotnet.com/Community/Resources/Default.aspx?AFXPath=/Resource[@ResourceId='F0CECD72-7287-4891-8D5E-5763AD14C2FD']]

This is a tool to show the assemblies that loaded in current running processes in your system. Here is the output without any arguement.

C:\Temp>asmlist
AsmList: A tool to display assemblies loaded in current processes.
Usage: AsmList <-m assemblyName> | <-p PID> | <-a> | <-?> | <-h>

    [Options]:
    -m assemblyName
        List all processes loaded with the specified assembly.
        Also show the full assembly display name.
    -p PID
        List all the assemblies loaded in process PID.
    -a
        List all the assemblies loaded in all processes.
    -?/-h
        Show this help message.

Example:
    AsmList -m mscorlib
    AsmList -p 1234
    AsmList -a
    AsmList -?

Here is a sample output:

C:\Temp>asmlist -m system
Process:    1760        c:\tools\loader.exe
        Assembly : c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll
        Assembly Name: System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

It shows process c:\tools\loader.exe loaded assembly System.dll from “c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll“, and the full name of the assembly is “System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”

It also works on native image. Here is another sample output:

C:\Temp>asmlist -m system
Process:    1288        c:\tools\loader.exe
        Assembly : c:\windows\assembly\gac\system\1.0.3300.0__b77a5c561934e089\system.dll
        Assembly Name: System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

        Assembly : c:\windows\assembly\nativeimages1_v1.0.3705\system\1.0.3300.0__b77a5c561934e089_8c33a6d1\system.dll
        Assembly Name: System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

        Assembly : c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll
        Assembly Name: System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

The second one is the ngened native image of Systemdll, judging from where it comes from.

If you have used tlist.exe from windows debugger, then you know what this tool is about.

Be careful about the “-a” option. It is very slow.

Feedback and suggestions?