Are you still using a Visual Studio Console Application to write some simple testing code for C#/F#? Are you still looking for some alternative that is similar to Python Jupyter Notebook in .NET world? Are you still looking for a scratchpad application to write some simple .NET code?
Now you don't need to continue the search for the alternative, .NET Interactive is the one you need. It is exactly similar to Python Jupyter Notebook and you can install it at Visual Studio Code.
Getting Started
- Install the latest Visual Studio Code.
- Install the latest .NET 5 SDK
- Install the .NET Interactive Notebooks extension from the marketplace.
After you have installed it, to start it, just follow the steps below:
- Press Ctrl+Shift+P to open the Command Palette.
- Select .NET Interactive: Create new blank notebook.
- Create as '.dib' if you prefer the latest notebook format.
- Choose your preferred programming language from C#/F#/PowerShell.
- And you are done. Just start your coding :).
As you can see from the screenshot above, it supports IntelliSense (autocomplete) though it does not support debugging now.
FAQ:
Q: How to add reference for a library?
A: You can use something like below:
#r "System.Data.SqlClient" #r "nuget:System.Text.Json,4.7.2"
Q: How about using keyword? Supported?
A: Yes
using System.Net;
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.