cs-script.cli 4.14.4

dotnet tool install --global cs-script.cli --version 4.14.4
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local cs-script.cli --version 4.14.4
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=cs-script.cli&version=4.14.4
                    
nuke :add-package cs-script.cli --version 4.14.4
                    

CS-Script (CLI)

CS-Script is a CLR based scripting system which uses ECMA-compliant C# as a programming language.

CS-Script is one of the most mature C# scripting solutions. It became publicly available in 2004, just two years after the first release of .NET. And it was the first comprehensive scripting platform for .NET.

CS-Script allows direct single-step execution of files containing ECMA-compliant C# code (either from shell or from the application).

Canonical "Hello World" script (script.cs):

using System;
Console.WriteLine("Hello World!");

The script can be executed fom the terminal: css is a native executable. It simply launches the script engine assembly (cscs.dll) without the need to invoke .NET launcher dotnet.

css script.cs

You can read in more details about script engine on the product home page: https://github.com/oleg-shilo/cs-script/wiki/CLI-Script-Execution.

From the start, CS-Script was heavily influenced by Python and the developer experiences it delivers. Thus, it tries to match the most useful Python features (apart from the Python syntax). Here are some highlights of the CS-Script features. - Scripts are written in plain vanilla CLS-compliant C#. Though classless scripts (top-level statements) are also supported. - Remarkable execution speed matching performance of compiled managed applications. - Including (referencing) dependency scripts from the main script. - Referencing external assemblies from the script. - Automatic referencing external assemblies based on analyses of the script-imported namespaces ('usings'). - Automatic resolving (downloading and referencing) NuGet packages. - Building a self-sufficient executable from the script. - Possibility to plug in external compiling services for supporting alternative script syntax (e.g. VB, C++) - Scripts can be executed on Windows, Linux and MacOS (.NET5 needs to be present). - Full integration with Windows, Visual Studio, VSCode, Notepad++ (CS-Script plugin for Notepad++ brings true IntelliSense to the 'peoples editor'), Sublime Text 3

Note, when upgrading or uninstalling CS-Script CLI .NET tool you may need to ensure that you stop any running instances of the script engine. You can do that by executing this simple command: css -servers:stop (or even simpler: css -kill).

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
4.14.4 135 3/29/2026
4.14.3 893 3/10/2026
4.14.2 340 3/4/2026
4.14.1 101 3/4/2026
4.14.0 131 3/3/2026
4.13.1 3,272 12/20/2025
4.13.0 783 12/11/2025
4.12.0.1 1,317 11/16/2025
4.12.0 307 11/15/2025
4.11.5 945 10/28/2025
4.11.4 687 10/15/2025
4.11.3 334 10/13/2025
4.11.2 487 10/7/2025
4.11.1 1,280 9/7/2025
4.11.0 1,258 8/10/2025
4.10.1 529 7/30/2025
4.10.0 222 7/29/2025
4.9.9 432 7/26/2025
4.9.8 2,118 6/9/2025
4.9.7 319 6/8/2025
Loading failed

---

## Changes

Major change is migration of RoslynEvaluator to the modern Roslyn API, which allows bringing full support for importing dependency scripts and handling pre-processor symbols.

The old behavior (old Roslyn API with `SourceCodeKind.Script`) can be re-enabled by setting `Globals.DefaultRoslynCompilationToScript=true`.

NOTE: if you choose `DefaultRoslynCompilationToScript=true` you will also need to set `CompileInfo.CodeKind` to 'script' if you are executing your script with optional CompileInfo parameter:

```c#

var info = new CompileInfo { CodeKind = SourceCodeKind.Script };
````
========================================


### CLI

- Improved script assembly location tracking.
 Now even if the script assembly is loaded not from a file but from memory the location can still be resolved in the script via CS-Script own extension method `Assembly.Location()`


### CSScriptLib

- #458: Type 'CSScriptLib.Project' in Assembly 'CSScriptLib, Version=4.14.3.0, Culture=neutral, PublicKeyToken=4c30df19402bb442' is not marked as serializable
- #459: Possibility to specify default search dirs, assemblies and namespaces in a hosted environment?
 ProjectBuilder is made public and documented.
- #444 + #445: IEvaluator API update
 - `IEvaluator.Check(string code)` is marked as `[obsolete]`
 - `IEvaluator.CheckCode(string scriptCode)`
 - `IEvaluator.CheckFile(string scriptFile)`
 - `IEvaluator.CompileAssemblyFromCode(string scriptCode, CompileInfo info)`
 - `IEvaluator.CompileAssemblyFromFile(string scriptFile, CompileInfo info)`
 - `CodeDomEvaluator.CompileAssemblyFromFile(string scriptFile, CompileInfo info, out Project project)`
 - `CodeDomEvaluator.CompileAssemblyFromCode(string scriptCode, CompileInfo info, out Project project)`
- Changed default Roslyn mode: `Globals.DefaultRoslynCompilationToScript=false`
- Added `Globals.AlwaysEmitRoslynProject=false`
- Improve RoslynEvaluator: better script import, error mapping, project attachment, and assembly filtering