CDS.CSharpScript2.ScintillaEditor 2.4.1

dotnet add package CDS.CSharpScript2.ScintillaEditor --version 2.4.1
                    
NuGet\Install-Package CDS.CSharpScript2.ScintillaEditor -Version 2.4.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CDS.CSharpScript2.ScintillaEditor" Version="2.4.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CDS.CSharpScript2.ScintillaEditor" Version="2.4.1" />
                    
Directory.Packages.props
<PackageReference Include="CDS.CSharpScript2.ScintillaEditor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CDS.CSharpScript2.ScintillaEditor --version 2.4.1
                    
#r "nuget: CDS.CSharpScript2.ScintillaEditor, 2.4.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CDS.CSharpScript2.ScintillaEditor@2.4.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CDS.CSharpScript2.ScintillaEditor&version=2.4.1
                    
Install as a Cake Addin
#tool nuget:?package=CDS.CSharpScript2.ScintillaEditor&version=2.4.1
                    
Install as a Cake Tool

CDS.CSharpScript2.ScintillaEditor

Scintilla5-based WinForms editor control for C# script editing, powered by Roslyn.

Description

CDS.CSharpScript2.ScintillaEditor provides a drop-in WinForms UserControl that gives your application a professional C# script editor backed by the Scintilla5 native editing component and full Roslyn IntelliSense.

Features

  • Syntax highlighting — real Roslyn token classification (keywords, types, literals, comments, …).
  • Code completion — member lists, type suggestions, and smart single-letter prioritisation.
  • Signature help (call tips) — parameter info as you type method calls.
  • Hover tooltips — type and XML-doc info on mouse hover.
  • Error indicators — squiggles and a live diagnostic list tied to the Roslyn compiler.
  • Find/Replace — built-in find and replace dialog.
  • Output panel — companion RTFOutputPanel for displaying script results.

Quick Start

Add ScintillaScriptEditor to a form and wire up a ScriptEnvironment:

using CDS.CSharpScript2;
using CDS.CSharpScript2.ScintillaEditor;

var editor = new ScintillaScriptEditor();
editor.Dock = DockStyle.Fill;
Controls.Add(editor);

// Setting Environment starts live analysis immediately
editor.API.Environment = ScriptEnvironment.Default;

Compile and run the script the user has typed:

var executable = await editor.API.CompileAsync();

if (!executable.HasErrors)
    await executable.RunAsync();

All scripting properties and methods are accessed through editor.API to keep them separate from the standard WinForms Control surface.

API Surface (editor.API)

Member Description
Environment Get/set the ScriptEnvironment (references, namespaces, globals type). Setting it restarts live analysis.
Script Get/set the script text shown in the editor.
HasErrors true when the most recent live-analysis pass found at least one error.
CurrentDiagnostics Diagnostics from the most recent analysis pass.
CompileAsync() Full Roslyn compilation; returns an ExecutableScript.
CurrentCompiledScript The result of the last CompileAsync() call, or null if the script has changed since.
HighlightText(start, length) Highlights a range in the editor.
ClearHighlightText() Removes the active highlight.
ScriptChanged Event raised when the user modifies the script text.
DiagnosticsUpdated Event raised when the live-analysis diagnostic set changes.

See the CDS.CSharpScript2.WinForms.Sample project for a full working example.

Requirements

  • .NET 10.0 (Windows)
  • x64 or ARM64 — Scintilla5 is a native library; AnyCPU is not supported at runtime

Dependencies

Attributions

Icon by Flaticon Uicons

Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.4.1 47 7/1/2026
2.3.1-alpha.0.5 39 7/1/2026