This is a repository of TeamCity.csi which is an interactive tool for running C# scripts. It can be used as a TeamCity build runner or installed as a command-line tool on Windows, Linux, or macOS.
The tool requires .NET 6 runtime.
TeamCity.csi is available as a NuGet package.
Install the tool on your OS:
dotnet tool install dotnet-csi -g --version <version>Uninstall the tool:
dotnet tool uninstall dotnet-csi -gCurrently, the tool can be used as a TeamCity build runner provided in terms of TeamCity 2021.2 Early Access Program. Read the runner's documentation for more details.
You can use this tool independently of TeamCity, to run tasks in C# from the command line on any supported OS.
Launch the tool in the interactive mode:
dotnet csiRun a specified script with a given argument:
dotnet csi script-file.csxUsage:
dotnet csi [options] [script-file.csx] [script-arguments]Script arguments are accessible in scripts via a global list called Args.
Supported arguments:
| Option | Description | Alternative form |
|---|---|---|
--help |
Show how to use the command. | /?, -h, /h, /help |
--version |
Display the tool version. | /version |
--source |
Specify the NuGet package source to use. Supported formats: URL, or a UNC directory path. | -s, /s, /source |
--property <key=value> |
Define a key=value pair for the global dictionary called Props, which is accessible in scripts. | -p, /property, /p |
@file |
Read the response file for more options. | |
-- |
Indicates that the remaining arguments should not be treated as options. |
Please use our YouTrack to report related issues.