Note: This documentation is for the legacy command-line tool odasa.
The final version was released in May 2020. Support for this tool expires in May 2021.

For documentation on the new generation CodeQL CLI, see CodeQL CLI .
In particular, you may find the Notes for legacy QL CLI users useful in planning your migration.

Skip to end of metadata
Go to start of metadata

This topic describes how to make some configuration changes to the extractor that is used for the analysis of C# code.

Configuring the C# extractor

In bespoke build environments, the C# extractor (located in ${odasa_tools}\csharp\Semmle.Extraction.CSharp.Driver.exe) can be further configured using a compiler-settings file.

The command-line options are:

  • --compiler ${compiler}
    Specify the compiler, so that the extractor can validate that this is a compilation command, and use it to figure out the correct .NET Framework.
  • --framework ${directory}
    Manually specify the directory of the .NET Framework.
  • --cil
    Enable extraction of Common Intermediate Language. This is needed for queries and data flow involving CIL.

Enabling/disabling ASP extraction

From Semmle 1.9.7 onward, project configurations generated by the bootstrap tool include an additional build command which enables the extraction of ASP.NET files with the extension .aspx or .ascx. The additional command can be seen as line 8 in the example below.

Example project file with ASP extraction enabled
<project language="csharp">
    <check>git clone -n ${repository} ${src}</check>
    <check>git checkout ${revision}</check>
    <build>java -jar ${odasa_tools}/extractor-asp.jar .</build>
    <build index="true">"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" &amp;&amp; msbuild /t:rebuild "SparkleShare/Windows/SparkleShare.sln"</build>
    <build>odasa duplicateCode --ram 2048 --minimum-tokens 100</build>

To enable ASP extraction in a project configuration file, insert the build command from line 8 on a new line. To disable ASP extraction from a project configuration file, delete this build command from the file.