Visual Studio Project Command-Line Syntax

The basic syntax to translate a Visual Studio solution or project is to specify the corresponding build option for your project as part of the Fortify Static Code Analyzer translation command. This invokes a build integration that analyzes your solution and project files and automatically executes the appropriate translation steps.

Important! To ensure that the build integration correctly pulls in all of the appropriate project dependencies and resources, you must run the Fortify Static Code Analyzer command from a command prompt with access to your build environment configuration. Fortify strongly recommends you run this command from the Developer Command Prompt for Visual Studio to ensure an optimal environment for the translation.

In the following examples, Fortify Static Code Analyzer translates all the projects contained in the Visual Studio solution Sample.sln. You can also translate one or more specific projects by providing a semicolon-separated list of projects.

After the translation is complete, you can perform the analysis phase and save the results in an FPR file as shown in the following example:

sourceanalyzer –b MyProject -scan -f MyResults.fpr