---
id: "T:cAlgo.API.CompilationOptions"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOptions/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# CompilationOptions (class)

Compilation options container.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public class CompilationOptions
```

Available since cAlgo.API 5.1.

## Examples

C#:

```csharp
var options = new CompilationOptions { IncludeSourceCode = true, OutputAlgoFilePath = @"C:\Algos\Sample cBot.algo" };
var result = Compiler.Compile(@"Sample cBot\Sample cBot.csproj", options);
Print("Compilation succeeded: {0}", result.Succeeded);
```

Python:

```python
options = CompilationOptions()
options.IncludeSourceCode = True
options.OutputAlgoFilePath = r"C:\Algos\Sample cBot.algo"
result = api.Compiler.Compile(r"Sample cBot\Sample cBot.csproj", options)
api.Print(f"Compilation succeeded: {result.Succeeded}")
```

## Constructors

- `public CompilationOptions()` — Creates compilation options. [details](https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOptions/Constructor/index.md)

## Properties

- `public bool IncludeSourceCode {get; set;}` — Gets / Inits inclusion of source code in output algo file (Default is False). [details](https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOptions/IncludeSourceCode/index.md)
- `public string OutputAlgoFilePath {get; set;}` — Gets / Inits output algo file path, if not provided default platform algo path will be used. [details](https://help.ctrader.com/ctrader-algo/references/Compilation/CompilationOptions/OutputAlgoFilePath/index.md)

