Reference articles on history, science, culture and more
Encyclopedia

CS-Script

Scripting platform

CS-Script is a free and open-source scripting platform that enables creating scripts in ECMA-compliant C# syntax. These scripts have access to .NET Framework or Mono APIs.

CS-Script offers standalone script execution as well as hosting the script engine from CLR apps. A newer edition of this product, called CS-Script.Core works with .NET.

Existing .NET development tools (e.g. Visual Studio and Sharp Develop) can be used, allowing editing and debugging scripts within traditional .NET-aware development environments. Additionally, CS-Script support can be added to Notepad++ or Visual Studio Code via plugins.

FlashDevelop uses CS-Script as its internal scripting engine.

01Benefits

Simple deployment approach

Just bring both the script and engine file (about 100 KB) onto the system that has .NET runtime installed, and the script can be run.

Portability

Scripts can be run on any system that has CLR installed (including Mono).

Base language is a full featured C#

CS-Script is a truly object-oriented language that supports VB.NET, C++/CLI and J#. All .NET functionality is available (including FCL, COM Interop, Remoting, WPF, WCF). Easily available debugger and rich IDE (Visual Studio or third-party IDEs). Execution model within the script is the same as for any .NET application: static void Main().

Optimized interpretation

Interpretation of any statement in the script is done only once, even if the statement is frequently used throughout the code.

Strongly typed

Strong typing is a luxury not available for most of the scripting languages. All software development tasks can be done in the same language. GUI development for script application becomes easy.

Extensibility

The scripting system can be extended by using new assemblies written in any .NET languages or COM components. Any script can be easily converted into an application and vice versa. Functionality of any CLR application can be extended with scripting.

Script hosting

Can be run within WSH and can be mixed in one WSF file.

Watch videos about CS-ScriptExplainers and documentaries on YouTube (opens in a new tab)

Sources and credits

This article is adapted from the Wikipedia article CS-Script, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.

Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.