Questions tagged [ndepend]

NDepend is a static analysis tool for .NET managed code that focuses on code dependencies and quality.

NDepend is a static analysis tool for .NET managed code that provides extensive code metrics and dependency visualization using directed graphs and a dependency matrix. It also validates code architecture, design, and quality rules, integrates test-coverage analysis, and enables trend monitoring through codebase snapshot comparisons.

NDepend comes with many predefined code rules that users can supplement with custom rules written in Code Query Language (CQL). CQL is very similar to SQL, making codebase queries much like querying a relational database. The tool can also automatically check code rules during continuous integration.

References:

286 questions
438
votes
16 answers

Resolving MSB3247 - Found conflicts between different versions of the same dependent assembly

A .NET 3.5 solution ended up with this warning when compiling with msbuild. Sometimes NDepend might help out but in this case it didn't give any further details. Like Bob I ended up having to resort to opening each assembly in ILDASM until I found…
David Gardiner
  • 16,892
  • 20
  • 80
  • 117
63
votes
6 answers

Do you know any alternative to NDepend for architects?

do you know any software similar to NDepend? I've got it just recently, and found it very useful. It helped me a lot, but for now i don't have a possibility to buy a professional version. So, is there any alternative (maybe, open-source)?…
0100110010101
  • 6,469
  • 5
  • 33
  • 38
41
votes
6 answers

C#/.NET analysis tool to find race conditions/deadlocks

Is there a tool that analyses .NET code and finds race conditions? I have a bit of code that has a public static property that gets or creates a private static field. It also has a public static method that sets this field to null (...yes, I…
Steve Dunn
  • 21,044
  • 11
  • 62
  • 87
23
votes
2 answers

What is Abstractness vs. Instability Graph?

I recently used NDepend and it produced a good report on my .net assemblies and related pdbs. The most interesting thing I found in the report was abstractness vs. instability graph. I wanted to understand this in real detail, I read their docs and…
this. __curious_geek
  • 42,787
  • 22
  • 113
  • 137
22
votes
6 answers

Do you use NDepend?

I've been trying out NDepend, been reading a few blogposts about it and even heard a podcast. I think that NDepend might be a really useful tool, but I still don't see where I would use it. How do you use it? Do you use it, why? Why not? I would…
Karsten
  • 8,015
  • 8
  • 48
  • 83
21
votes
1 answer

Why Does Lack of Cohesion Of Methods (LCOM) Include Getters and Setters

I am looking at the LCOM metric as shown here, http://www.ndepend.com/Metrics.aspx So we are saying a few things, 1) A class is utterly cohesive if all its methods use all its instance fields 2) Both static and instance methods are counted, it…
peter
  • 13,009
  • 22
  • 82
  • 142
19
votes
3 answers

How to start using ndepend?

I recently downloaded ndepend and ran an analysis on an open source project I participate in. I did not now where to look next - a bit of visual and information overload and it turned out I don't even know where to start. Can anyone suggest starting…
Oded
  • 489,969
  • 99
  • 883
  • 1,009
11
votes
2 answers

Is it possible to exclude entire namespaces from NDepend analysis?

I have a setup where Visual Studio 2010 runs test coverage analysis and it's output is absorbed by NDepend during an integration build. A few assemblies contain generated code that needs to be ignored by NDepend. Is there a way to do this?…
Kilhoffer
  • 32,375
  • 22
  • 97
  • 124
11
votes
2 answers

Why does the async keyword generate an enumerator & additional struct when compiled?

If I create a simple class like the following: public class TestClass { public Task TestMethod(int someParameter) { return Task.FromResult(someParameter); } public async Task TestMethod(bool someParameter) { …
Johnathon Sullinger
  • 7,097
  • 5
  • 37
  • 102
10
votes
2 answers

Are there any good/automateable dependency management tools for managing application, database & external resources dependencies?

I would like to build an overview/map of as many of our applications dependencies as possible. Analyzing .NET application dependencies is fairly easy using tools such as NDepend (which I love!). But when it comes to external dependencies, such as…
JohannesH
  • 6,430
  • 5
  • 37
  • 71
9
votes
1 answer

CppDepend vs NDepend

Both CppDepend and NDepend are developed by the same company and seem to be based on the same codebase and share some features. I haven't found a side by side comparison site yet. I work on several plain c# solutions without any c++ code at all but…
bitbonk
  • 48,890
  • 37
  • 186
  • 278
8
votes
3 answers

How to find code which is only called by tests

Occasionally I am looking at some code, I search for usages of a method (using resharper) and find that it is only called by tests. So it's effectively redundant and I can delete it and the methods that call it. Obviously there's no point in having…
Jonny Cundall
  • 2,552
  • 1
  • 21
  • 33
8
votes
1 answer

Can I use NDepend to count casts?

I've got some inherited code that has a tendency to pass objects around as interfaces (IFoo, for example) then, at arbitrary places in the code, spontaneously cast them to concrete implementations of those interfaces (say, MyConcreteFoo). Here's a…
7
votes
1 answer

Driving NDepend with NUnit

Is it possible to use NUnit to run CQL queries using NDepend? It would be nice to be able to just include the NDepend dlls in a UnitTests library and write tests like: [Test] public void DomainAssemblyHasNoDatabaseDependencies ... or something…
7
votes
1 answer

Find not disposed IDisposables

I am looking for memory leaks in a huge code base so going line by line and observing for every possible location of where an IDisposable is used without being put in a using statement or without being disposed is not an option. I am currently using…
Mihail Shishkov
  • 14,129
  • 7
  • 48
  • 59
1
2 3
19 20