
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!
在2019年11月,我们宣布对同时支持C#和F#的Jupyter笔记本提供.NET支持。 今天,我们很高兴宣布.NET Notebook体验的预览2。 在本文中,您可以找到此版本的所有主要新功能。 加入我们!
什么是新的 (What’s new)
新名称-与.NET互动 (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.
随着Try .NET中场景的增长,我们希望使用一个新名称来涵盖我们所有的新经验,这些内容包括由Blazor支持的Web上的可运行片段(如.NET页所示 ),以及带有dotnet的.NET Core交互式文档。尝试使用.NET Notebooks的全局工具。
Today we are announcing our official name change to .NET interactive.
今天,我们宣布将正式名称更改为.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交互式是一组CLI工具和API,使用户能够在Web,降价和笔记本上创建交互式体验。
.NET Interactive Breakdown
.NET交互式细分
dotnet interactive
global tool : For .NET Notebooks (Jupyter and nteract)
全局工具 :.NET笔记本电脑(Jupyter和nteract)
dotnet try
global tool : For Workshops and offline docs. Interactive markdown with a backing project.
全局工具 :适用于Workshops和离线文档。 带有支持项目的交互式降价。
trydotnet.js
API (
API(
not publicly available yet): Online documentation. For example, on docs and .NET page. Currently, only used internally at Microsoft.
新仓库-dotnet / interactive (New Repo – dotnet/interactive)
Moving forward, we have decided to split dotnet try
and dotnet interactive
tools into separate repos.
展望未来,我们决定将dotnet try
和dotnet interactive
工具分成单独的存储库。
For any issues, feature requests, and contributions to .NET Notebooks, please visit the .NET Interactive repo.
如有任何问题,功能要求以及对.NET Notebook的贡献,请访问.NET Interactive库 。
For any issues, feature requests, and contributions on interactive markdown and trydotnet.js, please visit the Try .NET repo.
对于任何问题,功能要求以及对交互式markdown和trydotnet.js的贡献,请访问Try .NET库 。
新的全球工具– dotnet互动 (New Global Tool – dotnet interactive)
如何安装.NET 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.
Jupyter。 Jupyter可以使用Anaconda安装。
Open the Anaconda Prompt (Windows) or Terminal (macOS) and verify that Jupyter is installed and present on the path:
打开Anaconda Prompt(Windows)或Terminal(macOS),并验证Jupyter是否已安装并存在于路径中:
> jupyter kernelspec list
python3 ~\jupyter\kernels\python3
Next, in an ordinary console, install the
dotnet interactive
global tool:接下来,在普通控制台中,安装
dotnet interactive
全局工具:
> dotnet tool install --global Microsoft.dotnet-interactive
- Install the .NET kernel by running the following within your Anaconda Prompt: 通过在Anaconda提示符中运行以下命令来安装.NET内核:
> 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: 您可以通过在Anaconda提示符中再次运行以下命令来验证安装:
> 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 try
experience please visit dotnet/try.
请注意:如果您正在寻找dotnet try
体验,请访问dotnet / try 。
新语言支持– PowerShell (New language support – PowerShell)
PowerShell笔记本 (PowerShell Notebooks)

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.
PowerShell笔记本将PowerShell的管理功能与笔记本的丰富视觉体验结合在一起。 将PowerShell的可执行体验与富文本格式和可视化功能集成在一起,为PowerShell用户提供了集成和扩展其教学和支持文档的方案。 例如,这个新的PowerShell功能的演示很容易转换为可共享的交互式教学工具。

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.
借助.NET交互式内核提供的多内核体验,单个笔记本(现在具有PowerShell支持)可以有效地同时针对管理平面和数据平面。
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.
DBA,系统管理员和支持工程师都发现PowerShell笔记本对于资源操纵和管理很有用。 例如,此笔记本指导用户如何从PowerShell创建Azure VM。

We look forward to seeing what our customers to do with this experience.
我们期待看到我们的客户如何利用这种经验。
在nteract.io中运行.NET代码 (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.
除了在Jupyter Notebook中编写.NET代码外,用户现在还可以以交互方式编写其代码。 nteract是一个开放源代码组织,该组织构建SDK,应用程序和库,以帮助人们充分利用交互式笔记本和REPL。 我们很高兴能够让.NET用户利用nteract提供的丰富REPL体验,包括nteract桌面应用程序。

To get started with .NET Interactive in nteract please download the nteract desktop app and install the .NET kernels.
要在nteract中开始使用.NET Interactive,请下载nteract桌面应用程序并安装.NET内核 。
资源资源 (Resources)
Try sample .NET notebooks online using Binder. This also allows you try out .NET Interactive daily builds.
使用Binder在线尝试示例.NET笔记本 。 这也使您可以尝试.NET Interactive的每日构建。
Share your own .NET notebooks with others online using Binder.
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.
我们的团队迫不及待想看看您使用.NET Interactive做什么。 请查看我们的仓库以了解更多信息,并让我们知道您的构建。
Happy interactive programming!
互动编程快乐!