DEV Community

James MacIvor
James MacIvor

Posted on • Originally published at macivortech.com on

VSCode .NET Interactive Notebooks

VSCode .NET Interactive Notebooks

The ML.NET logo with a robot face next to it.

Where Jupyter Notebooks Falls Short

Do you love intellisense? I do.

Which is why working in Jupyter Notebooks can be so frustrating. Part of the benefits of a strongly typed language is to enable tooling that can make us more efficient developers.

VS Code Extension

Well, lucky for us the folks who develop .NET Interactive love and support us. They have created an extension for VSCode called .NET Interactive Notebooks

Now before you go and download this extension be aware that it is in preview and only will work with Visual Studio Code Insiders. This is just a fancy way of saying that it's in active development and stuff will be broken.

That said, lets take a look at how well it works at the moment.

The Setup Experience

In order to get Visual Studio Code to set everything up properly you'll need to attempt to open a .ipynb file.

You can use the one from my gist if you don't have another one handy:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

You'll be prompted to install the Python extension. Also, if you had the .ipynb file open when Python installed then you may need to close and reopen it. VSCode will also handle installing .NET Interactive in the background. In fact, VSCode is doing so much for me automatically it was a pretty nice experience to get setup.

Once everything is setup you should see the notebook render properly:

A screenshot of an interactive notebook.

So, that's a fairly friendlier experience than Jupyter Notebooks - but do I get my intellisense?!

The answer is... I do!

A screenshot of an interactive notebook.

So I know how I'll be writing my .NET notebooks from now on!

But if you still prefer Jupyter Notebooks with .NET then here is the guide to get set up with that too.

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay