dll-dependency

A .NET DLL question

I created a C# file and wish to compile it into a DLL for future use. However, this .cs file depends on another DLL. In my code inside my .cs file I am doing something like: using anotherlib.dll; When I try to compile it into a DLL, the compiler tells me that it can't find that anotherlib.dll (missing directive or assembly reference)....

How can Find all dependencies of an application?

In a Portable-Exe ,there is possibilities to find the imported section ,and also all imported dll names (using import descriptor).Here Ex, One application Exe has many imported dlls(kernel32,advapi,user,comctl32....etc),Now i want to find all dependencies in that app exe(imported dlls)..give me the logic using recursive function calling....