Skip to content

Release v4.9.8.0

Latest
Compare
Choose a tag to compare
@oleg-shilo oleg-shilo released this 09 Jun 09:25
· 2 commits to master since this release

Note

Windows Defender often marks zip files as infected for no reason. Use VirisTotal reports to ensure the safety of any downloaded distributable:

Deployment (installation Instructions)

Deployment

Any OS

Install as .NET Tool

dotnet tool install --global cs-script.cli

After that, you can invoke the script engine as css.
You may need to add the folder of css to the system PATH, unless .NET SDK setup does it.
It can be one of these depending on your OS:

  • %USERPROFILE%\. dotnet\tools
  • ~/.dotnet/tools
  • $HOME/.dotnet/tools

Note:

  • before upgrading the already installed tool, you may need to ensure the script engine is not running. You can do it with a simple command css -kill.
  • you may prefer to enable an optional build server (see css -server ?) to boost script compilation performance. On Windows, it's done automatically on the very first execution, but on Linux, if you want to use this feature, it needs to be done manually (sudo css -server:add).

Linux

Ubuntu (terminal)

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

Depending on the user context you may need to add permissions to the CS-Script temp dir sudo chmod -R 777 /tmp

You can also create a convenient alias (cs-script_x.x-x.deb package does it automatically):

alias css='dotnet /usr/local/bin/cs-script/cscs.dll'+

After that, you can invoke CS-Script engine from anywhere by just typing 'css'.

Note: this very release is not available on Chocolatey and WinGet but only on Nuget (.NET tool) as described above.

Windows

Chocolatey (pending approval

choco install cs-script

WinGet (pending approval)

winget install cs-script

Manual (Any OS)

Just unpack the corresponding 7z file and start using the script engine executable cscs.

When using on Windows, you can build an alias(shim) exe css.exe for an easy launch of the script engine process: cscs -self-alias.
The same shim is created if you are installing the CS-Script as a choco package.

Barebone distribution

The minimalistic manual distro on the target machine with .NET SDK installed is just a set of the script engine files:

Linux

cscs.dll
cscs.runtimeconfig.json

Running: dotnet ./cscs.dll <script>

You can also create an alias for convenient access:

echo "alias css='dotnet /usr/local/bin/cs-script/cscs.dll'" >> ~/.bashrc
source ~/.bashrc

And then you can run scripts with a simple: css <script>

Windows

cscs.exe
cscs.dll
cscs.runtimeconfig.json

Running: cscs.exe <script>


Changes

This release is identical to v4.9.7 functionality-wise. It only delivers a minor change to the supplementary tool WDBG (web debugger for cs-script) but not to the engine itself.

CLI

v4.9.8

  • WDBG - web application changed to allow self-discovery of cscs.dll.

v4.9.7

  • Stop killing its own process on css -lists kill *
  • Bumped version: Microsoft.CodeAnalysis.CSharp.Scripting v4.14.0
  • New WDBG environment
  • WDBG - Addressed multiple parsing problems when preparing the script for execution

CSScriptLib

v4.9.7

  • #416: CompileInfo parameter for CompileMethod()