Skip to content

Releases: oleg-shilo/cs-script

Release v4.12.0.0

15 Nov 09:20

Choose a tag to compare

Note

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

Installing

  • CLI tool:
    dotnet tool install --global cs-script.cli
  • Hosted class library in .NET Project: create the project from any .NET project template and add CS-Script nuget package:
    dotnet add package cs-script.
More Deployment Options (detailed 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.12.0.0/; file=cs-script_4.12-0.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

choco install cs-script

WinGet (pending approval)

winget install cs-script

Scoop

scoop bucket add cs-script https://github.com/oleg-shilo/cs-script
scoop 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

  • CS-Script build for .NET 9 is no longer available. The supported version ar now the last two .NET LTS releases: .NET 8 and .NET 10.

CLI

  • CS-Script ported to .NET 10
  • Added '-l' option for auto-selecting the latest available .NET Runtime with the call: css -self-rt -l
  • Added support for .NET 10 file-based execution directives: #:package and #r.
  • Changed the search dir priorities to low local overwrite of the distributed included scrips (libs): %CSSCRIPT_INC% is now higher than "%CSSCRIPT_ROOT%/lib`
  • In the css.exe status print out is now saying <not set> instead of <not integrated> for the InstallationDir field.
    It's not really about the integration but setting the CSSCRIPT_ROOT envar.
  • Updated ProjectBuilder.GenerateProjectFor to include the script engine assembly and global includes (e.g. global-usings)

CSScriptLib

  • #428: Script.Evaluator.Eval() exception
  • Added /shared option for CodeDomEvaluator. To dramatically speedup "next" compilation.

Release v4.11.5.0

28 Oct 01:22

Choose a tag to compare

Note

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

Installing

  • CLI tool:
    dotnet tool install --global cs-script.cli
  • Hosted class library in .NET Project: create the project from any .NET project template and add CS-Script nuget package:
    dotnet add package cs-script.
More Deployment Options (detailed 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.11.5.0/; file=cs-script_4.11-5.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

choco install cs-script

WinGet (pending approval)

winget install cs-script

Scoop

scoop bucket add cs-script https://github.com/oleg-shilo/cs-script
scoop 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

CLI

  • Added auto initialization on the first run of css -vs
  • Added convenient csscript.run(this string app, string args, string dir) to be available to all script files
  • Improved -which
  • Addressed integration issue with Notepad++ when including global_using

CSScriptLib

  • no changes

Release v4.11.5.0-pre

18 Oct 11:34

Choose a tag to compare

Release v4.11.5.0-pre Pre-release
Pre-release

Changes

CLI

  • Added auto initialization on the first run of css -vs
  • Added convenient csscript.run(this string app, string args, string dir) to be available to all script files
  • Improved -which

CSScriptLib

  • no changes

Release v4.11.4.0

15 Oct 12:16

Choose a tag to compare

Note

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

Installing

  • CLI tool:
    dotnet tool install --global cs-script.cli
  • Hosted class library in .NET Project: create the project from any .NET project template and add CS-Script nuget package:
    dotnet add package cs-script.
More Deployment Options (detailed 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.11.2.0/; file=cs-script_4.11-2.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

choco install cs-script

WinGet (pending approval)

winget install cs-script

Scoop

scoop bucket add cs-script https://github.com/oleg-shilo/cs-script
scoop 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

CLI

  • Added -csproj custom command
  • improved shim detection for Scoop installations

CSScriptLib

  • no changes

Release v4.11.3.0

13 Oct 11:46

Choose a tag to compare

Note

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

Installing

  • CLI tool:
    dotnet tool install --global cs-script.cli
  • Hosted class library in .NET Project: create the project from any .NET project template and add CS-Script nuget package:
    dotnet add package cs-script.
More Deployment Options (detailed 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.11.2.0/; file=cs-script_4.11-2.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

choco install cs-script

WinGet (pending approval)

winget install cs-script

Scoop

scoop bucket add cs-script https://github.com/oleg-shilo/cs-script
scoop 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

CLI

  • CS-Script config file is moved to JSON format (custom XML config files are still supported)
  • For system-wide (global) installation of CS-Script, its config file location is changed to: %Environment.SpecialFolder.CommonApplicationData%/cs-script/css_config.json)
  • Added -csproj custom command

CSScriptLib

  • no changes

Release v4.11.2.0

07 Oct 08:31

Choose a tag to compare

Note

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

Installing

  • CLI tool:
    dotnet tool install --global cs-script.cli
  • Hosted class library in .NET Project: create the project from any .NET project template and add cs-script nuget package:
    dotnet add package cs-script.
Deployment (detailed 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.11.2.0/; file=cs-script_4.11-2.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

choco install cs-script

WinGet (pending approval)

winget install cs-script

Scoop

scoop bucket add cs-script https://github.com/oleg-shilo/cs-script
scoop 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

CLI

  • Updating current directory via -l switch is disabled for all custom command scripts.
  • Added public extension methods
  • Reset dotnet-engine project template on the change of the target framework (set via -self-rt)
  • Added a small automation library shell.cs to the distribution
  • added -scrumble custom command
  • added shell.cs lib-script

CSScriptLib

  • no changes

Release v4.11.1.0

07 Sep 01:07

Choose a tag to compare

Note

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

Installing

  • CLI tool:
    dotnet tool install --global cs-script.cli
  • Hosted class library in .NET Project: create the project from the any .NET project template and add cs-script nuget package:
    dotnet add package cs-script.
Deployment (detailed 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.11.0.0/; file=cs-script_4.11-0.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

choco install cs-script

WinGet (pending approval)

winget install cs-script

Scoop

scoop bucket add cs-script https://github.com/oleg-shilo/cs-script
scoop 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

CLI

  • Added -self-rt custom command for setting the script engine runtime version

CSScriptLib

  • no changes

Release v4.11.0.0

10 Aug 08:04

Choose a tag to compare

Note

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

Installing

  • CLI tool: dotnet tool install --global cs-script.cli
  • Hosted class library in .NET Project: create the project from the WixSharp Project template.
Deployment (detailed 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.11.0.0/; file=cs-script_4.11-0.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

CLI

  • fixed problem with css -ls <kill-all|ka>
  • Added support for pre-release packages //css_nuget -pre <package>
  • WDBG:
    • Improved tracking of declaration scope
    • UX improvements
    • Inject dbg metadata is ported to pure Roslyn.
    • Detect debug metadata out of sync and report it (2)

CSScriptLib

  • Added NativeAOT sample
  • CodeDomEvaluator.CompileOnServer is made obsolete (with error)

Release v4.10.1.0

15 Aug 10:57

Choose a tag to compare

Note

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

Deployment (detailed 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.9.0/; file=cs-script_4.9-9.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

All changes delivered by CS-Script v4.10.0 plus:

  • WinDebugger usability changes
  • Repackaged CSScriptLib as v4.10.0 had a packaging mistake.

v4.10.0 Changes

CLI

  • -ng:csc is now using running csc.exe with the "magic" /shared parameter that keeps VBCSCompiler.exe running and improves the compilation performance dramatically.
  • -ng:csc is now routed to -ng:csc-inproc
  • WDBG:
    • Added disposing of abandoned user sessions
    • fixed problem with local methods in the call stack

CSScriptLib

  • CSScript.CodeDomEvaluator local build is now using running csc.exe with the "magic" /shared parameter that keeps VBCSCompiler.exe` running and improves the compilation performance dramatically (triggered by #423).
  • CodeDomEvaluator.CompileOnServer default value now is set to true.
  • CSScript.EvaluatorConfig.CompilerOptions now allows removing some of the default compiler options that you may find undesirable for whatever reason. This can be accomplished by specifying the option value with the !no prefix (e.g. !no/shared will remove /shared.

Release v4.10.0.0

29 Jul 12:11

Choose a tag to compare

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.9.0/; file=cs-script_4.9-9.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

CLI

  • -ng:csc is now using running csc.exe with the "magic" /shared parameter that keeps VBCSCompiler.exe running and improves the compilation performance dramatically.
  • -ng:csc is now routed to -ng:csc-inproc
  • WDBG:
    • Added disposing of abandoned user sessions
    • fixed problem with local methods in the call stack

CSScriptLib

  • CSScript.CodeDomEvaluator local build is now using running csc.exe with the "magic" /shared parameter that keeps VBCSCompiler.exe` running and improves the compilation performance dramatically (triggered by #423).
  • CodeDomEvaluator.CompileOnServer default value now is set to true.
  • CSScript.EvaluatorConfig.CompilerOptions now allows removing some of the default compiler options that you may find undesirable for whatever reason. This can be accomplished by specifying the option value with the !no prefix (e.g. !no/shared will remove /shared.