Format of the build specification file for C# projects

The Klocwork build specification for C# projects, named <input-file>.out by default, is a text file in semicolon-separated format.

The build specification is divided into compilation units, each containing a "cscompile" and "csconfig" line. Each of these compilation units has a unique identifier of the form CS<number>, for example, CS1, CS2, etc.

The first field is a tag to identify the type of line. The possible tags are as follows:

Tag Description
version build specification format version
csconfig user compiler configuration
cscompile used to track compiler execution

version line

The version line is used to define the build specification format version. It must be the first line in the build specification. Only one version line may appear in a build specification.

Example version line:

version;108

The three-digit integer is used to encode the version. The first (left-most) digit encodes the major version ("1" in above example); the last two digits encode the minor version ("08" in above example, resulting in the "1.8" full version code).

csconfig line

The csconfig line is used to record the configuration used by the native compiler.

Example csconfig line (truncated):

csconfig;CS2;D:\WBFSManager\trunk\libwbfsNET;/define:DEBUG,TRACE;/reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll,...C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll

The fields are:

Field Description
"csconfig" tag tag for config lines
compilation ID unique identifier for the compilation unit, used to bind a csconfig line with a cscompile line (for example, CS2)
source project directory path to the directory containing the C# project (for example, D:\WBFSManager\trunk\libwbfsNET)
compiler options a list of semicolon-separated options for the C# analysis engine (for example, /define:DEBUG,TRACE)

cscompile line

cscompile lines are used to track compiler execution.

Example cscompile line:

cscompile;CS2;bin\Debug\libwbfsNET.dll;WbfsIntermWrapper.cs;Properties\AssemblyInfo.cs

The fields are:

Field Description
"cscompile" tag tag for compilation lines
compilation ID unique identifier for the compilation unit, used to bind a csconfig line with a cscompile line (for example, CS2)
DLL or exe path to DLL or executable (bin\Debug\libwbfsNET.dll in the above example)
source files semicolon-separated list of source files in the project (for example, WbfsIntermWrapper.cs;Properties\AssemblyInfo.cs)