BACKGROUND
As time goes by, I find myself more and more turning to NDepend to gain insight into the design/implementation of legacy applications.
QUESTION
Rather than adding JustMyCode
to CQL queries, is there a way to permanently configure NDepend (at the project level) to simply ignore the .NET Framework? I could be wrong, but I am pretty sure that this feature was supported by NDepend v3.
EXAMPLE
- Open your solution in Visual Studio and click Rebuild
- create an NDepend project based on your solution file (*.sln)
- run the Analysis
- open the interactive (non-HTML) Dependency Graph
- click the Reset arrow in the top left corner (hint: the recycling icon)
- click reset to application assemblies only
- observe
- you will no longer see references to the .Net Framework (note: the blue writing is gone)
- right click on one of your assemblies: Select Types
- click that I use directly
- the following CQL will appears in the queries window:
from t in Types where t.IsUsedBy ("MyCompany.MyProduct.MyAssemblyName") select new { t, t.NbILInstructions }
- observe
- more than likely you will now see .NET Framework references (note: the blue writing is back) in the query results window
- add JustMyCode to the CQL query and the .NET references disappear again:
from t in JustMyCode.Types where t.IsUsedBy ("MyCompany.MyProduct.MyAssemblyName") select new { t, t.NbILInstructions }
CONTEXT
- Application: NDepend version 4.1.0.6871
- View: Dependency Graph
The only two ways to ignore a .NET assemblies are: