宣布.NET交互式-尝试.NET包括.NET笔记本等

At Microsoft Ignite 2019, we were happy to announce that the "Try .NET global tool" added support for C# and F# Jupyter notebooks. Last week, the same team that brought you .NET Notebooks announced Preview 2 of the .NET Notebook.

在Microsoft Ignite 2019上,我们很高兴地宣布“试用.NET全局工具”增加了对C#和F#Jupyter笔记本的支持。 上周,带给您.NET笔记本的同一团队宣布了.NET Notebook的Preview 2。

名称更改-.NET交互式 (Name Change - .NET interactive)

As the scenarios for what was "Try .NET" continued to grow, the team wanted to a name that encompassed all the experiences they have as well as all the experiences they will have in the future. What was the Try .NET family of projects is now .NET interactive.

随着“ Try .NET”场景的不断增长,团队希望其名称能够涵盖他们所拥有的所有经验以及将来的所有经验。 Try .NET项目系列现在是.NET交互式的

The F# community has enjoyed F# in Juypter Notebooks from years with the pioneering functional work of Rick Minerich, Colin Gravill and many other contributors! .NET Interactive is a family of tools and kernels that offer support across a variety of experiences as a 1st party Microsoft-supported offering.

Rick MinerichColin Gravill和许多其他贡献者的开创性工作中F#社区多年来一直在Juypter Notebooks中享受F# ! .NET Interactive是一系列工具和内核,它们作为第一方Microsoft支持的产品提供了多种体验的支持。

.NET interactive is a group of CLI (command line interface) tools and APIs that enable users to create interactive experiences across the web, markdown, and notebooks.

.NET交互式是一组CLI(命令行界面)工具和API,使用户能够在Web,降价和笔记本上创建交互式体验。

.NET Interactive API和工具 (.NET Interactive APIs and Tools)

Here is what the command line looks like using the dotnet CLI.

使用dotnet CLI的命令行如下所示。

  • dotnet interactive global tool:

    dotnet interactive全局工具:

    dotnet interactive global tool:

    dotnet interactive全局工具:

  • dotnet try global tool:

    dotnet try全局工具:

    • Used for workshops and offline documentation. Interactive markdown with a backing project. I wrote about this in May 2019.

      用于研讨会和离线文档。 带有支持项目的交互式降价。 我在2019年5月撰写了有关此内容的文章。

    dotnet try global tool:

    dotnet try全局工具:

  • trydotnet.js API

    trydotnet.js API

    • Currently, only used internally at Microsoft, this API is used on the .NET page and C# documentation. Maybe one day I can use it on my blog? And yours?

      当前,此API仅在Microsoft内部使用,在.NET页C#文档中使用。 也许有一天我可以在我的博客上使用它? 你的呢?

    trydotnet.js API

    trydotnet.js API

安装.NET Interactive (Installing .NET Interactive)

You can start playing with it today, locally or in the cloud! Seriously. Just click and start using it.

您可以立即在本地或云端开始使用它! 说真的只需单击并开始使用它。

Before you install the .NET interactive global tool, please make sure you have the following:

在安装.NET交互式全局工具之前,请确保您具有以下内容:

  • .NET Core 3.1 SDK

    .NET Core 3.1 SDK

  • Jupyter : JupyterLab can be installed using Anaconda or conda or pip.

    Jupyter :可以使用Anacondacondapip安装JupyterLab。

    Jupyter : JupyterLab can be installed using Anaconda or conda or pip.

    Jupyter :可以使用Anacondacondapip安装JupyterLab。

  • Open Anaconda Prompt (windows) or Terminal (macOS).

    打开Anaconda Prompt (Windows)或Terminal(macOS)。

    • Verify that Jupyter ins installed and present on the current path.

      验证Jupyter ins是否已安装并存在于当前路径中。

    Open Anaconda Prompt (windows) or Terminal (macOS).

    打开Anaconda Prompt (Windows)或Terminal(macOS)。

> jupyter kernelspec list
  python3        ~\jupyter\kernels\python3
  • Open Windows terminal and install the dotnet interactive global tool:

    打开Windows终端并安装dotnet交互式全局工具:

> dotnet tool install --global Microsoft.dotnet-interactive
  • Switch back to Anaconda prompt and install the .NET kernel. To be clear, here we are using the dotnet CLI to let the Jupyter CLI know that we exist!

    切换回Anaconda提示符并安装.NET内核。 明确地说,这里我们使用dotnet CLI来让Jupyter CLI知道我们已经存在!

> 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
  • While still in Anaconda prompt, verify that .NET kernel is installed like this

    仍然在Anaconda提示符下时,验证是否已这样安装.NET内核
> 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

Now you can just run "jupyter lab" at the command line and you're ready to go!

现在,您可以在命令行中运行“ jupyter lab ”,您就可以开始了!

更多语言-PowerShell (More Languages - PowerShell)

The .NET kernel now comes PowerShell support too! In Preview 2, the .NET interactive team partnered with PowerShell to enable this scenario. You can read more about the announcement of the PowerShell blog.

.NET内核现在也支持PowerShell! 在预览版2中,.NET交互式团队与PowerShell合作以启用此方案。 您可以阅读有关PowerShell博客公告的更多信息。

.NET in Jupyter Notebooks

The .NET interactive team is looking forward to hearing your thoughts. You can talk to them at https://github.com/dotnet/interactive

.NET交互式团队期待听到您的想法。 您可以在https://github.com/dotnet/interactive与他们交谈

多种.NET语言笔记本(Multi .NET language Notebooks)

I wanted to highlight one of the hidden gems .NET interactive has had since Preview 1 - multi-language notebooks. That means that users can switch languages in a single notebook. Here is an example of a C#, F#, and PowerShell in a single .ipynb file.

我想强调一下.NET交互自预览版1以来隐藏的瑰宝之一-多国语言笔记本。 这意味着用户可以在一个笔记本中切换语言。 这是单个.ipynb文件中的C#,F#和PowerShell的示例。

Multiple Language Notebooks

Using one of the language magic commands (#!csharp, #!fsharp,#pwsh) tells the .NET Interactive kernel to run the cell in a specific language. To see a complete list of the available magic commands, enter the #!lsmagic command into a new cell and run it.

使用一种语言魔术命令( #!csharp#!fsharp#!fsharp #pwsh )告诉.NET Interactive内核以特定语言运行单元。 要查看可用魔术命令的完整列表,请在新单元格中输入#!lsmagic命令并运行它。

nteract.io中的.NET代码 (.NET Code in nteract.io)

Additionally, you can now write .NET Code in nteract.io. 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.

此外,您现在可以在nteract.io中编写.NET代码。 Nteract是一个开放源代码组织,其构建SDK,应用程序和库,以帮助人们充分利用交互式笔记本和REPL。 我们很高兴能够让.NET用户利用nteract提供的丰富REPL体验,包括nteract桌面应用程序

Charts and graphs in 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内核

学到更多 (Learn More)

The team is looking forward to seeing what you build. Moving forward, the team has split dotnet try and dotnet interactive tools into separate repos.

团队期待看到您的构建。 向前迈进,团队将dotnet trydotnet 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库

翻译自: https://www.hanselman.com/blog/announcing-net-interactive-try-net-includes-net-notebooks-and-more

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值