ClrKernel.Core
0.4.0
See the version list below for details.
dotnet add package ClrKernel.Core --version 0.4.0
NuGet\Install-Package ClrKernel.Core -Version 0.4.0
<PackageReference Include="ClrKernel.Core" Version="0.4.0" />
<PackageVersion Include="ClrKernel.Core" Version="0.4.0" />
<PackageReference Include="ClrKernel.Core" />
paket add ClrKernel.Core --version 0.4.0
#r "nuget: ClrKernel.Core, 0.4.0"
#:package ClrKernel.Core@0.4.0
#addin nuget:?package=ClrKernel.Core&version=0.4.0
#tool nuget:?package=ClrKernel.Core&version=0.4.0
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 | Versions 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. |
-
net8.0
- ClrKernel.Primitives (>= 0.4.0)
- Dotnet.Script.DependencyModel (>= 2.0.1)
- Dotnet.Script.DependencyModel.NuGet (>= 2.0.1)
- Microsoft.CodeAnalysis.CSharp.Scripting (>= 5.6.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Newtonsoft.Json (>= 13.0.4)
- NuGet.Packaging (>= 7.6.0)
- NuGet.Protocol (>= 7.6.0)
- System.Security.Cryptography.Xml (>= 10.0.10)
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.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. |
|
|
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. |
GitHub repositories
This package is not used by any popular GitHub repositories.