.NET Interactive is here! | .NET Notebooks Preview 2
In November 2019, we announced .NET support for Jupyter notebooks with both C# and F# support. Today we are excited to announce Preview 2 of the .NET Notebook experience. In this article you can find all the major new features of this release. Join us!
New Name – Meet .NET interactive
As our scenarios grew in Try .NET, we wanted a new name that encompassed all our new experiences from the runnable snippets on the web powered by Blazor (as seen on the .NET page), to interactive documentation for .NET Core with the dotnet try global tool, to .NET Notebooks.
Today we are announcing our official name change to .NET interactive.
.NET interactive is a group of CLI tools and APIs that enable users to create interactive experiences across the web, markdown, and notebooks.
.NET Interactive Breakdown
global tool : For .NET Notebooks (Jupyter and nteract)
global tool : For Workshops and offline docs. Interactive markdown with a backing project.
API (not publicly available yet): Online documentation. For example, on docs and .NET page. Currently, only used internally at Microsoft.
New Repo – dotnet/interactive
Moving forward, we have decided to split
dotnet interactivetools into separate repos.
- For any issues, feature requests, and contributions to .NET Notebooks, please visit the .NET Interactive repo.
- For any issues, feature requests, and contributions on interactive markdown and trydotnet.js, please visit the Try .NET repo.
New Global Tool – dotnet interactive
How Install .NET Interactive
First, make sure you have the following installed:
- The .NET 3.0 SDK.
- Jupyter. Jupyter can be installed using Anaconda.
- Open the Anaconda Prompt (Windows) or Terminal (macOS) and verify that Jupyter is installed and present on the path:
> jupyter kernelspec list python3 ~\jupyter\kernels\python3
- Next, in an ordinary console, install the
dotnet interactiveglobal tool:
> dotnet tool install --global Microsoft.dotnet-interactive
- Install the .NET kernel by running the following within your Anaconda Prompt:
> dotnet interactive jupyter install [InstallKernelSpec] Installed kernelspec .net-csharp in ~\jupyter\kernels\.net-csharp .NET kernel installation succeeded [InstallKernelSpec] Installed kernelspec .net-fsharp in ~\jupyter\kernels\.net-fsharp .NET kernel installation succeeded [InstallKernelSpec] Installed kernelspec .net-powershell in ~\jupyter\kernels\.net-powershell .NET kernel installation succeeded
- You can verify the installation by running the following again in the Anaconda Prompt:
> jupyter kernelspec list .net-csharp ~\jupyter\kernels\.net-csharp .net-fsharp ~\jupyter\kernels\.net-fsharp .net-powershell ~\jupyter\kernels\.net-powershell python3 ~\jupyter\kernels\python3
Please Note: If you are looking for
dotnet tryexperience please visit dotnet/try.
New language support – PowerShell
PowerShell notebooks combine the management capabilities of PowerShell with the rich visual experience of notebooks. The integration of PowerShell’s executable experience with rich text and visualization open up scenarios for PowerShell users to integrate and amplify their teaching, and support documents. As an example, this demo of a new PowerShell feature was easily transformed into a shareable, interactive teaching tool.
With the multi-kernel experience provided by the .NET interactive kernel a single notebook, now with PowerShell support, can efficiently target both the management plane and the data plane.
DBAs, sysadmins, and support engineers alike have found PowerShell notebooks useful for resource manipulation and management. For example, this notebook teachers the user how to create an Azure VM from PowerShell.
We look forward to seeing what our customers to do with this experience.
Run .NET Code in nteract.io
In addition to writing .NET Code in Jupyter Notebooks, users can now write their code in nteract. nteract is an open-source organization that builds SDKs, applications, and libraries that helps people make the most of interactive notebooks and REPLs. We are excited to have our .NET users take advantage of the rich REPL experience nteract provides,including the nteract desktop app.
To get started with .NET Interactive in nteract please download the nteract desktop app and install the .NET kernels.
- Try sample .NET notebooks online using Binder. This also allows you try out .NET Interactive daily builds.
- Create and run .NET notebooks on your machine.
- Share your own .NET notebooks with others online using Binder.
- .NET Interactive with nteract
Our team can’t wait to see what you do with .NET Interactive. Please check out our repo to learn more and let us know what you build.
Happy interactive programming!