Skip to content

CLI Environment Specification

Oleg Shilo edited this page Apr 6, 2022 · 7 revisions

UNDER CONSTRUCTION

Oveview

This article is describing the steps required for preparing the environment for executing C# scripts with CS-Script and also using various IDEs that are integrated with CS-Script (Notepad++, VSCode, Sublime Text).

The scripts can be prepared by using any text editor but the most convenient way to do that is to use an editor/IDE that has specific CS-Script integration. All these tools are distributed with the CS-Script engine and CS-Script syntax services included. Thus such an editor can be used with CS-Script just out of the box. The only dependency you need to satisfy is to install .NET:

  1. .NET

However, in many cases, it is more beneficial to install and maintain the script engine and syntax services separately to allow updates without waiting for the next version of the editor. This is the complete set of dependencies that needs to be installed in such a case:

  1. .NET
  2. CS-Script
  3. Syntaxer (syntax services)

The installations are simple and do not take too much effort to accomplish. After that, you can simply configure your editor to use freshly installed services from the location where they are installed. Below an example of such configuration in:

Sublime Text:

image

VSCode

image

Deployment steps

.NET

You can find all required information about installing .NET on the product home page: https://dotnet.microsoft.com/en-us/download/dotnet)

Note: it is highly recommended that you install not .NET runtime but .NET SDK. Otherwise, the syntax of your script will be somewhat limited.

On Windows you can also use Chocolatey:

choco install dotnet-sdk 

Arguably the easiest way to install .NET on Linux is via Snap. Though on Mint 20+ Snap installation is blocked. You can unblock it with just a single command in the terminal. Read this for details: https://fossbytes.com/how-to-enable-snap-and-install-snap-packages-on-linux-mint-20/

CS-Script

All details are here.

On Windows you can also use Chocolatey:

choco install cs-script 

On Linux, you can use this simple shell command. Sample command for installing CS-Script v4.4.2:

repo=https://github.com/oleg-shilo/cs-script/releases/download/v4.4.2/; file=cs-script_4.4-2.deb; rm $file; wget $repo$file; sudo dpkg -i $file

You can also install CS-Script manually

Syntaxer

On Windows you can use Chocolatey:

choco install cs-syntaxer 

On Linux manual deployment is the only option.

And manual installation is ultimately simple. Download the package from the Releases page or from Chocolatey and simply extract its content in any location of your choice. That's it.