ClrKernel.Server
0.7.0
See the version list below for details.
dotnet add package ClrKernel.Server --version 0.7.0
NuGet\Install-Package ClrKernel.Server -Version 0.7.0
<PackageReference Include="ClrKernel.Server" Version="0.7.0" />
<PackageVersion Include="ClrKernel.Server" Version="0.7.0" />
<PackageReference Include="ClrKernel.Server" />
paket add ClrKernel.Server --version 0.7.0
#r "nuget: ClrKernel.Server, 0.7.0"
#:package ClrKernel.Server@0.7.0
#addin nuget:?package=ClrKernel.Server&version=0.7.0
#tool nuget:?package=ClrKernel.Server&version=0.7.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.Core (>= 0.7.0)
- ClrKernel.LanguageServices (>= 0.7.0)
- ClrKernel.Primitives (>= 0.7.0)
- Microsoft.Extensions.Logging.Console (>= 10.0.10)
- StreamJsonRpc (>= 2.25.29)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.