FAQ
-
Which .NET version I need to run NDepend?
-
How do you compare NDepend and FxCop (the static analyzer tool provided by Microsoft)?
-
How can I analyse my ASP.NET application with NDepend?
-
Where does NDepend store my CQLinq queries and rules?
-
Why does NDepend use the web?
-
Which .NET version I need to run NDepend?
You need .NET version 3.5 or higher to run NDepend 4.x.
Also, NDepend 4.x is able to analyze .NET assemblies v1.0 v1.1 v2.0 v3.0 v3.5 v4.0 v4.5 and Silverlight assemblies as well.
Assemblies can be built from any .NET language including C#, VB.NET, MC++ and C++\CLI.
-
How do you compare NDepend and FxCop (the static analyzer tool provided by Microsoft)?
FxCop and NDepend are good complements to each other. Very few needs are handled by both tools.
FxCop rules are an extensible set of rigid good practices which should be followed by every professional .NET dev.
CQLinq rules are customizable and typically tied with a particular application.
For example, they can allow the specification of customized encapsulation constraints such as, I want to ensure that this layer will never use this other layer or I want to ensure that this class will never be instantiated outside this particular namespace.
NDepend and CQLinq also addresses code metrics. For example you can ensure that most of your methods will never have more than 200 IL instructions or more than 5 parameters.
Moreover the interactive view provided by VisualNDepend helps developers get a better understanding of the structure of their code.
-
How can I analyse my ASP.NET application with NDepend?
NDepend analysis is mainly based on assemblies, although beginning of source code analyse appears with version 2.0 beta2.
It is then necessary to compile your ASP.NET application before analyzing it.
It is possible thanks to the aspnet_compiler.exe tool (available since ASP.NET 2.0).
Here is some info about this tool:
aspnet_compiler.exe allows the complete compilation of a web application. Hence, it is possible to only deploy the DLLs with no source files. In addition to the obvious advantages for performance, this compilation and deployment model is well adapted to large scale projects. In fact, it allows the creation of a more complex compilation process (such as the use of unit tests or the use of the MSI technology) and the enforcement of intellectual property by obfuscating the assemblies. Of course, this comes at the price of a lesser flexibility for updates.
The aspnet_compiler.exe tool is easy to use. You specify the virtual folder containing your web application as an input using the /m option (or the root Windows folder with the /p option), the name of your application using the /v option and the output folder containing the results from the compilation.
aspnet_compiler.exe /m /LM/W3SVC/1/ROOT/MyWebSite D:/TestDeploy
aspnet_compiler.exe /v MyWebSiteName /p D:/Site/MyWebSite D:/TestDeploy
|
Then you simply need to copy and paste the contents of the output folder to the proper virtual folder on the server. It is interesting to note that this output folder still contains the files with .aspx extensions but that are emptied from their content. Your web.config file as well as the generated assemblies are in the /bin folder. You can also notice the presence of the PrecompiledApp.config file. The XML elements contained in this file tells ASP.NET if it is authorized to compile .aspx pages. Hence, the parameter of this file can prevent new .aspx pages added to a site to be taken into account.
-
Where does NDepend store my CQLinq queries and rules?
NDepend stores your CQLinq queries and rules in the project file. As the source code is the design you might prefer storing your CQLinq queries and rules directly in your source code (C#, VB.NET...) as explained in the document Declare CQLinq rules in C# or VB.NET source code.
-
Why does NDepend use the web?
NDepend Trial Edition and professional Edition both use the web to inform you if a newer version is available.
NDepend Professional Edition also use the web to contact us for anti-piracy reasons. It sends us only NDepend license info, NDepend version and unique IDs of the machine. At no time will any of your personnal or professional information be sent to us.
We precise that NDepend Professional Edition can run even if your machine is offline.
|
|
NDepend is also available for
Java and C++
More than 3.000 companies provide better .NET code with NDepend
Full Visual Studio Integration
 |
|