-
Notifications
You must be signed in to change notification settings - Fork 256
CS Script on Linux
Since porting CS-Script on .NET 5 the documentation is still in the process of being refined and cleared from the legacy content. Thus it may contain some minor inaccuracies until both statuses below are set to full and complete or this disclaimer is removed. | |
.NET 5 accuracy status: | partial |
Review/update status: | pending |
CS-Script requires Mono v5.0.1 or higher.
Note that since Mono is hosted on the custom package repository it's not included into cs-scrip[t package as a dependency and you wil be required to install it manually with 'sudo apt-get install mono-complete'
. See http://www.mono-project.com/download for details.
Note, CS-Script has a built-in update functionality. For already installed CS-Script package you can always trigger updating with the `-update` switch:
sudo cscs -update
- The GitHub repository hosts the universal package compatible with any Ubuntu distro, install it with the following shell command.
repo=http://www.cs-script.net/cs-script/linux/ubuntu/; file=$(echo cs-script_)$(curl -L $repo/version.txt --silent)$(echo _all.deb); rm $file; wget $repo$file; sudo dpkg -i $file
- Alternatively you can download the latest package (cs-script<max-ver>.deb) from cs-script/bin/linux/ubuntu/.
Install the package either by double-clicking the .deb file or with'sodo dpkg -i cs-script_*.deb'
.
--- under development ---
-
Ensure you have Mono v5.0.1 or higher.
-
Copy binaries (cscs.exe, CSSRoslynProvider.dll) into
/usr/lib/cs-script/bin
(or/usr/local/lib/cs-script/bin
). The binaries are available from the following GitHub locations:
https://github.com/oleg-shilo/cs-script/blob/master/Source/Build/cscs.exe
https://github.com/oleg-shilo/cs-script/blob/master/Source/Build/CSSRoslynProvider.dll -
Add execute permission to the script engine executable:
sudo chmod +x /usr/lib/cs-script/bin/cscs.exe
-
Create symlink to the script engine file:
sudo ln -s /usr/lib/cs-script/bin/cscs.exe /usr/bin/cscs
The following is a few useful configuration settings for CS-Script on Linux.
sudo cscs -config:set:DefaultRefAssemblies=add:"System.ValueTuple.dll"
sudo cscs -config:set:SearchDirs=add:%MONO%/4.5/Facades