Skip to content

Instantly share code, notes, and snippets.

@the-nose-knows
Last active April 27, 2017 23:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save the-nose-knows/02ef408011584f7e2b86f65f45e18e5a to your computer and use it in GitHub Desktop.
Save the-nose-knows/02ef408011584f7e2b86f65f45e18e5a to your computer and use it in GitHub Desktop.
using System;
using System.Reflection;
using System.IO;
namespace DotNetInspectorGadget
{
class DotNetInspectorGadget
{
static int Main(string[] args)
{
if(args.GetLength(0) < 1)
{
Console.WriteLine("Add a single parameter that is your" +
" path to the file you want inspected.");
return 1;
}
try {
var assemblies = Assembly.LoadFile(@args[0]).GetReferencedAssemblies();
if (assemblies.GetLength(0) > 0)
{
foreach (var assembly in assemblies)
{
Console.WriteLine(assembly);
}
return 0;
}
}
catch(Exception e) {
Console.WriteLine("An exception occurred: {0}", e.Message);
return 1;
} finally{}
return 1;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment