ClrKernel.Core 0.6.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ClrKernel.Core --version 0.6.0
                    
NuGet\Install-Package ClrKernel.Core -Version 0.6.0
                    
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="ClrKernel.Core" Version="0.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ClrKernel.Core" Version="0.6.0" />
                    
Directory.Packages.props
<PackageReference Include="ClrKernel.Core" />
                    
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 ClrKernel.Core --version 0.6.0
                    
#r "nuget: ClrKernel.Core, 0.6.0"
                    
#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 ClrKernel.Core@0.6.0
                    
#: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=ClrKernel.Core&version=0.6.0
                    
Install as a Cake Addin
#tool nuget:?package=ClrKernel.Core&version=0.6.0
                    
Install as a Cake Tool

CI Release

ClrKernel

A Jupyter kernel for .NET. C# cells are evaluated with Roslyn's scripting engine (Microsoft.CodeAnalysis.CSharp.Scripting), with more CLR languages (PowerShell, F#) on the roadmap. Notebooks run interactively in JupyterLab / VS Code (Jupyter extension) and headlessly via nbconvert or papermill — including from schedulers like SQL Server Agent.

ClrKernel is a maintained fork of SciSharp/ICSharpCore, created after Microsoft deprecated .NET Interactive / Polyglot Notebooks (April 2026). Relative to upstream it adds: correct headless execution under nbclient/papermill, full output capture for async/await cells, control channel + heartbeat + graceful shutdown_request handling, patched vulnerable dependencies, and the kernelspec shipped inside the NuGet package.

Install

dotnet tool install --global ClrKernel
jupyter kernelspec install "$(clrkernel --kernel-spec-path)" --user --name clrkernel
jupyter kernelspec list   # should show: clrkernel

Requires a .NET 8+ runtime (RollForward=Major: newer majors work) and Jupyter.

Use

Pick the ClrKernel (C#) kernel in JupyterLab or VS Code. Cells support #r "nuget: Package, Version" and #r "path/to/local.dll" references, with REPL-style state persisting across cells.

Importing shared libraries

#!import loads C# code from another file into the session — use it to share helper libraries between notebooks, no .NET Interactive required:

#!import "../lib/jobbooks.dib"

Supports .dib (C# sections run; markdown and other-language sections are skipped), .ipynb (code cells run), and .csx/.cs (whole file). Relative paths resolve against the notebook's directory, and nested #!imports inside a library resolve relative to that library's own file. Each resolved file runs once per session — re-importing is a no-op unless you pass --force (#!import --force "lib.dib"), which is handy while iterating on the library itself. Imported files can use #r directives, including #r "nuget: ...", and can #!import further files.

Headless / scheduled execution:

jupyter nbconvert --to notebook --execute --output out.ipynb etl.ipynb
papermill etl.ipynb runs/etl_out.ipynb -k clrkernel --language .net-csharp -p run_date 2026-08-04

A failing cell exits non-zero (job schedulers see the failure); papermill also persists the partially-executed output notebook as a diagnostic artifact.

Develop

./scripts/install-dev-kernel.sh    # kernel 'clrkernel-dev' running from bin/ output
                                   # iterate: dotnet build + restart kernel
./scripts/install-local-tool.sh    # pack + install the global tool from a local
                                   # feed; tests the full packaged experience
clrkernel --kernel-spec-details    # show which kernelspec the binary resolves

License

Apache 2.0, preserving the upstream license. Original work © SciSharp (Kerry Jiang, Haiping Chen, and contributors); fork maintained by ClrKernel.

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 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.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on ClrKernel.Core:

Package Downloads
ClrKernel.Server

JSON-RPC-over-stdio notebook host for ClrKernel: executes C# cells via ClrKernel.Core for editor integrations (VS Code notebooks) — no Python or Jupyter required. Hosted by the ClrKernel CLI (`clrkernel serve`) and embeddable by other clients.

ClrKernel.Jupyter

Jupyter kernel implementation for ClrKernel: the ZeroMQ wire protocol, message handlers, and kernel event loop that host ClrKernel.Core over the Jupyter messaging protocol. Used by the ClrKernel CLI tool and embeddable by other hosts.

ClrKernel.LanguageServices

C# script language services for ClrKernel: Roslyn-powered completion, hover (quick info), and signature help that reflect a live notebook session — prior-cell symbols, #r "nuget:" types, and imports. Editor-neutral; drives the ClrKernel LSP server and Jupyter complete_request/inspect_request.

ClrKernel.Runner

Headless runner for ClrKernel notebooks: parses and executes .nb.md (executable markdown), .dib, .ipynb, and .csx files with papermill-style parameterization (-p/-r/-f/-y) and executed .ipynb output (-o). Built on ClrKernel.Core; no Jupyter or Python required.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.8.0 130 8/10/2026
0.7.0 140 8/8/2026
0.6.0 120 8/7/2026
0.5.0 72 8/7/2026
0.4.1 77 8/7/2026
0.4.0 82 8/7/2026