C and C++ C# Third-Party External

CodeSonar Plug-in for Visual Studio [Windows only]

The CodeSonar plug-in for Visual Studio allows users to build and analyze CodeSonar projects and examine analysis results from within Visual Studio.

Note: A separate Visual Studio Code Extension is also available.



Overview

The CodeSonar plug-in for Visual Studio allows users to build and analyze CodeSonar projects and examine analysis results from within Visual Studio.

To install the plug-in, follow the instructions in CodeSonar Plug-in for Visual Studio: Setting Up [Windows only].

Once installed, the CodeSonar plug-in can be selectively enabled on a project-by-project basis.

When the plug-in is enabled in Hook mode, it will observe all Visual Studio builds of the project and accumulate CodeSonar project components based on those builds. Once a project is analyzed, you can view the analysis results within Visual Studio.

When it is enabled in Import mode, you can use the plug-in to import analysis results from a CodeSonar hub, then view the analysis results.

For a guided instruction, see the Visual Studio Plug-in Tutorial.

Terminology

We use the following terminology.

analysis mode Every project has an associated CodeSonar analysis mode.
  • Hook mode: for building and analyzing the project with CodeSonar, then examining the analysis results.
  • Import mode: for examining analysis results that have been imported from a hub.

There are two ways to change analysis mode for a project:

  • select your preferred analysis mode from the CodeSonar > Enable >... submenu, or
  • open the project properties dialog, select your preferred analysis mode, click Apply, then click OK.
current analysis The current analysis depends on the analysis mode.
  • Hook mode: the current analysis is the most recent analysis performed by the CodeSonar plug-in for your Visual Studio installation since you switched to Hook mode.
    If you have not analyzed the project since switching to Hook mode, there is no current analysis.
  • Import mode: the current analysis is the analysis you most recently imported.

Visual Studio Plug-in Links

The following sections provide detailed information about installing and using the CodeSonar plug-in for Visual Studio.