Semmle 1.22
Skip to end of metadata
Go to start of metadata

On this page:

Related topics:

HIDDEN

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">
  <ram>2048</ram>
  <timeout>600</timeout>
  <autoupdate>
    <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>
    <days-between-updates>1</days-between-updates>
  </autoupdate> 

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.