SciterSharpJS 3.0.3

dotnet add package SciterSharpJS --version 3.0.3
                    
NuGet\Install-Package SciterSharpJS -Version 3.0.3
                    
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="SciterSharpJS" Version="3.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SciterSharpJS" Version="3.0.3" />
                    
Directory.Packages.props
<PackageReference Include="SciterSharpJS" />
                    
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 SciterSharpJS --version 3.0.3
                    
#r "nuget: SciterSharpJS, 3.0.3"
                    
#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 SciterSharpJS@3.0.3
                    
#: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=SciterSharpJS&version=3.0.3
                    
Install as a Cake Addin
#tool nuget:?package=SciterSharpJS&version=3.0.3
                    
Install as a Cake Tool

SciterSharp — Sciter.JS bindings for .NET

NuGet NuGet downloads Publish NuGet License: GPL-3.0

C# bindings for the Sciter C/C++ API. Build native desktop apps for Windows and Linux with a UI written in HTML, CSS and JavaScript, rendered by Sciter.JS, and drive it from C#.

Sciter is a small embeddable HTML/CSS engine. It is not a browser, so your app ships without Chromium or Electron, and the native library is only a few MB.

Install

NuGet

dotnet add package SciterSharpJS

The SciterSharpJS package has 2 targets:

  • net8.0 — Windows and Linux. The library picks the platform code at runtime.
  • net8.0-windows — the same, plus the WinForms SciterControl and the System.Drawing helpers.

The package includes the Sciter native libraries under runtimes/:

RID Native library
win-x64 sciter.dll
win-x86 sciter.dll
linux-x64 libsciter.so
linux-arm64 libsciter.so

SciterSharpJS replaces the old SciterSharpWindows, SciterSharpGTK and SciterSharpOSX packages, which are no longer updated.

From source

git clone https://github.com/ramon-mendes/SciterSharp.git

Open SciterSharpJS.sln in Visual Studio 2022 (or later) and build. Then add a project reference to SciterSharp/SciterSharp.csproj.

Quick start

A minimal app has 3 parts: a window, a host, and an HTML page.

Program.cs

using SciterSharp;
using SciterSharp.Interop;

class Program
{
    [STAThread]
    static void Main()
    {
        // Required for drag and drop support on Windows
        if (OperatingSystem.IsWindows())
            PInvokeWindows.OleInitialize(IntPtr.Zero);

        var wnd = new SciterMixinWindow();
        wnd.CreateTopLevelWindow(new PInvokeUtils.RECT(800, 600));
        wnd.CenterTopLevelWindow();

        var host = new AppHost();
        host.SetupWindow(wnd);
        host.AttachEvh(new AppEventHandler());

        wnd.LoadPage("file://" + Path.GetFullPath("res/index.html"));
        wnd.Show();
        wnd.Title = "My App";

        PInvokeUtils.RunMsgLoop();
    }
}

class AppHost : SciterHost
{
}

class AppEventHandler : SciterEventHandler
{
    // Called from JavaScript with Window.this.xcall("Host_HelloWorld", ...)
    public bool Host_HelloWorld(SciterElement el, SciterValue[] args, out SciterValue result)
    {
        result = new SciterValue("Hello from C#");
        return true;
    }
}

res/index.html

<html>
<head>
  <script>
    document.on("click", "button", () => {
      const msg = Window.this.xcall("Host_HelloWorld");
      document.$("#out").innerText = msg;
    });
  </script>
</head>
<body>
  <button>Call C#</button>
  <p id="out"></p>
</body>
</html>

For a complete sample, including how to pack the res/ folder into the executable with SciterArchive, see Tests/TestCoreApp.

Requirements

  • .NET 8 SDK
  • Windows 7 or later (x64 or x86), or Linux (x64 or arm64) with GTK 3
  • Visual Studio 2022 or later, if you build from source on Windows

Linux support is new and has not been fully tested yet. macOS is not supported yet.

Your app must find the Sciter native library (sciter.dll on Windows, libsciter.so on Linux) at runtime. The NuGet package and a project reference both copy it to your output under runtimes/<rid>/native/, and SciterSharp loads it from there. You can also put the library next to your executable, or get it from the Sciter.JS SDK.

To see Sciter error messages in the Visual Studio Output window, enable native debugging: Project Properties > Debug > Enable native code debugging. You can also subclass SciterDebugOutputHandler to route the messages yourself.

API overview

The library has 2 namespaces:

  • SciterSharp — the public classes you use in your app.
  • SciterSharp.Interop — P/Invoke definitions, the Sciter ABI, and low-level helpers.

Main classes and their mapping to the Sciter SDK:

Class Purpose
SciterWindow / SciterMixinWindow Create a top-level, child or popup window (SciterCreateWindow), load HTML (SciterLoadPage), process window messages
SciterHost Handle host notifications (SciterSetCallback), attach event handlers, register behaviors, call functions and evaluate script
SciterEventHandler Base class for native event handlers. Public methods can be called from JavaScript with Window.this.xcall()
SciterValue Sciter VALUE API. Convert data between C# and JavaScript (SciterValue.FromObject, JSON)
SciterElement DOM element API (HELEMENT)
SciterArchive Read files from a packed resource archive (SciterOpenArchive, SciterGetArchiveItem)
SciterDebugOutputHandler Receive Sciter debug and console output
SciterRequest Request API
SciterGraphics, SciterImage, SciterPath, SciterText Graphics API (incomplete)
SciterSharp.WinForms.SciterControl WinForms control that hosts a Sciter child window (net8.0-windows only)

Contributing

Pull requests are welcome. Help is most useful for:

  • WinForms and WPF integration on Sciter.JS
  • Completing the Graphics API
  • Adding XML documentation from the comments in the official Sciter SDK headers

Support

I do not have much time to maintain this project. For commercial support or specific help, contact me by email.

License

SciterSharp is licensed under the GNU General Public License v3.0.

Sciter itself is a separate product with its own license. Check the Sciter license terms before you ship your app.

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.  net8.0-windows7.0 is compatible.  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 was computed.  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.
  • net8.0

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

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
3.0.3 87 10/22/2026
3.0.2 88 10/22/2026