Reputation: 190799
I use Antlr tools as follows (on Mono)
dmcs /r:Antlr3.Runtime.dll /r:StringTemplate.dll *.cs /out:Main.exe
I reference two dll's, but there is another dll file (antlr.runtime.dll) that is referenced behind the scene. I got this when I have an error just copying two dlls and compile.
Are there any .NET tools to detect what dll's are referenced? For example, if I run 'DETECT Antlr3.Runtime.dll', I get 'antlr.runtime.dll'.
Upvotes: 3
Views: 177
Reputation: 49970
You could use Reflector or write one using Mono.Cecil (NDepend use this)
In a new project, reference Mono.Cecil
using System;
using Mono.Cecil;
namespace ReferenceDetector
{
class Program
{
static void Main(string[] args)
{
var assemblyPath = args[0];
var assemblyDefinition = AssemblyFactory.GetAssembly(assemblyPath);
Console.WriteLine(assemblyDefinition.Name.FullName);
foreach (AssemblyNameReference reference in assemblyDefinition.MainModule.AssemblyReferences)
{
Console.WriteLine("\t" + reference.FullName);
}
}
}
}
Upvotes: 2