Skip to content

NetLah-external/teamcity-csharp-interactive

 
 

Repository files navigation

C# script tool for

NuGet TeamCity.csi GitHub

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.

Prerequisites

The tool requires .NET 6 runtime.

Download and Install TeamCity.csi

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 -g

Use Inside TeamCity

Currently, 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.

Use Outside TeamCity

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 csi

Run a specified script with a given argument:

dotnet csi script-file.csx

Usage:

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.

Report and Track Issues

Please use our YouTrack to report related issues.

About

TeamCity C# script interactive

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 98.4%
  • Kotlin 1.6%