Today I was keen to try out some new ideas I wanted to explore in a Jupyter Notebook. I hadn’t used that environment for about six months so thought I’d grab the latest version of dotnet interactive before I started. Looking back at a previous post on updating dotnet interactive I jumped straight to dotnet tool search dotnet-interactive to find the latest version.
I then used the dotnet tool update –global Microsoft.dotnet-interactive –version 1.0.325601 command to (try) and update the dotnet-interactive package and got the Microsoft.dotnet-interactive is not compatible with net5.0 error.
This looked vaguely familiar. A quick search of my blog and I found I’d been in a similar situation before. Ah yes, when the update to PowerShell 7.1+ required .NET SDK 5.0.
When did dotnet-interactive required .NET 6.0?
Ok, so the latest version of Microsoft.dotnet-interactive requires .NET 6. When did that happen? Looking through the releases over the past months I can see that .NET 6 became a dependency 6 months ago with version 1.0.258003.
Inspecting installed .NET SDK Versions
It was time to have a look at the versions of the .NET SDK’s I had installed in my environment. Running dotnet –-info showed that I had versions 3.1.414 and 5.0.208.
Updating .NET SDK / Installing .NET 6 SDK
I headed over to dotnet.microsoft.com and downloaded the x64 bit version of the .NET SDK 6.0.
I installed the .NET SDK 6.0.x.
After installation I checked the installed versions again using dotnet –-info. I now have version 6.0.300 in addition to the versions I previously had.
Updating Microsoft.dotnet-interactive to version 1.0.325601
With dependencies sorted, re-running the update for .NET Interactive this time was successful. No more Microsoft.dotnet-interactive is not compatible with net5.0 error message.
dotnet tool update --global Microsoft.dotnet-interactive --version 1.0.325601
Summary
If you have been running Jupyter Notebook using PowerShell 7.1.x and are updating to recent versions of .NET Interactive you will also need the .NET 6.0 SDK.