I have a long .cs file (many such files) and to speed up the security audit I'd like to see a list of classes that this file is refering to.
For example:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Net;
using OrganizationName;
namespace OurCodebase
{
public class NeedsAudit
{
public void DoSomething()
{
System.IO.File.ReadAllText( "" );
WebRequest wr = WebRequest.Create( "" );
OurFramework.Clients.Search( "*jason*" );
}
}
}
This should result in a list:
System.IO.File
System.Net.WebRequest
OrganizationName.OurFramework.Clients
Is there a way to do this in Visual Studio, or perhaps a program that would parse the code and extract this list?

You have many options I used NDepend in several projects. NDepend offers a lot more than what you asked but it creates a visual graph of dependencies (read more here)
CodeMap for visual studio 2017 is also available for this kind of dependency visualization tasks.
CodeMap Page On MSDN: