Multi-project analysis - Miscellaneous

Enterprise Edition only

Multi-project analysis analyzes several projects together. It supports .vbg and .sln files.

Same file in several projects

A single file may belong to one or more projects in a multi-project analysis. If it's a binary file this will not affect the analysis. If it's a source code file, it might have an effect on it.

If a file belongs to several projects, Project Analyzer analyzes it as a part of the first project it's mentioned in (primary project). If you're analyzing a .vbg project group, the first project is always the start-up project. Other projects come in the order they're defined in the .vbg or .sln file, or in the order you added the single projects to the analysis.

Each source code file is analyzed just once regardless of how many projects it belongs to. Normally this is not a problem. However, if the code in the file compiles differently depending on which project it's in, there's a problem. There are at least 2 scenarios that may cause this to happen:

  1. Conditional compilation (#If..#Else..#End If). If 2 or more projects use different conditional compilation settings, Project Analyzer will use the settings of the primary project when reading this file.
  2. Different set of files. If the file contains a reference to another file, and the other file is different depending on the project, Project Analyzer will assume the call goes according to the primary project. As an example, assume that Form1 uses Class1. If Class1 may be A.cls and B.cls depending on the project, Project Analyzer will detect a reference to only one of these files.

If you notice unexplained dead code warnings or missing references under these conditions, you should make 2 analyses and combine them with Super Project Analyzer. Instead of a multi-project analysis, analyze two projects separately, and save the data in .sud files in the Pro menu. After the analyses, run Super Project Analyzer to combine the results and find dead code.

© Project Analyzer Help