Updating .NET Interactive

I’ve been using Jupyter Notebook with PowerShell since the early releases of of the Public Preview of PowerShell Support in Jupyter Notebooks in March 2020. I’ve written about how to use PowerShell Jupyter Notebook with Docker and Binder and even enabling C#, F# & PowerShell .NET Interactive Kernels in AzureML. If you were an early adopter like myself you probably also ran into issues updating .NET Interactive after you updated to PowerShell 7.1.x (see this post for how to update). Today there is a new release of .NET Interactive. Before embarking on generating some new PowerShell Jupyter Notebooks I needed to investigate updating .NET Interactive on my development machines to be current.

Littered in a number of the posts linked above is the process to setup a Jupyter Notebook environment from scratch in a number of different scenarios. And obviously this post on uplifting an environment to support PowerShell 7.1x with .NET Interactive. This post is for future Darren when I want to quickly go through the steps of identifying what versions of the dependencies I have on a system and then the process to quickly uplift it to the latest.

.NET SDKs Runtimes and Tools

Running dotnet –info will give you the .NET SDKs and Runtimes installed on your local system.

dotnet --info

To get the .NET Tools that are installed and their versions use the following command.

dotnet tool list --global

Identifying Available Updates

Using the dotnet command line interface we can query to find the latest release of .NET Interactive from Nuget.

dotnet tool search dotnet-interactive

Updating .NET Interactive

I can see that the latest available version from Nuget is 1.0.245901 and the currently installed version on this particular computer is 1.0.221505.

To update to the more recent release as of today for my system is therefore possible using the following command.

dotnet tool update --global Microsoft.dotnet-interactive --version 1.0.245901

Summary

In summary, dotnet –info will return the current SDK’s and Runtimes. dotnet tool list –global will tell me what version of .NET Interactive I have. dotnet tool search dotnet-interactive will tell me what the latest version that is available is and dotnet tool update –global Microsoft.dotnet-interactive will update the local system. Hopefully this helps someone else out, as well as making it easier for me updating next time.