Analyzing .Net code

Purpose

The .Net analyzer is intended to analyse dependencies between .Net types. It parses the selected assemblies using Mono.Cecil to determine dependencies between .Net types. The element hierarchy is based on types and namespaces.

Pre requisites

Performing an analysis

Command line usage

Use the following command to run a analysis:

"C:\Program Files\DsmSuite\Analyzers\DotNet\DsmSuite.Analyzer.DotNet.exe" AnalyzerSettings.xml

Settings

The following analyzer settings are defined:

Setting Description
LogLevel Log level as described above
Input.AssemblyDirectory Directory where assemblies to be analyzed are located.
Transformation.IgnoredNames Names in input data which will be ignore. Defines as regular expression.
Output.Filename Filename with dsi extension to which results will be written
Output.Compress Compress output file

Settings example

An example settings file is shown below (DSM Suite analysis example):

<?xml version="1.0" encoding="utf-8"?>
<AnalyzerSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <LogLevel>Error</LogLevel>
  <Input>
    <AssemblyDirectory>D:\GithubArchives\dsmsuite.sourcecode\build\bin</AssemblyDirectory>
  </Input>
  <Transformation>
    <IgnoredNames>
      <string>^System.</string>
      <string>^Microsoft.</string>
      <string>^Interop</string>
      <string>&lt;</string>
      <string>^_</string>
    </IgnoredNames>
  </Transformation>
  <Output>
    <Filename>DsmSuite.dsi</Filename>
    <Compress>false</Compress>
  </Output>
</AnalyzerSettings>

Logging

When logging is enabled the following types of logging are provided of the analysis:

Additional Logging

No additional logging files defined.

back