{ "cells": [ { "cell_type": "markdown", "id": "065bfcac", "metadata": { "polyglot_notebook": { "kernelName": "csharp" } }, "source": [ "管理NuGet包\n", "===========" ] }, { "cell_type": "markdown", "id": "0baca368", "metadata": {}, "source": [ "## 浏览和查找NuGet包" ] }, { "cell_type": "markdown", "id": "18559f3e", "metadata": {}, "source": [ "VS Code 提供了查看和查找NuGet包的UI界面:打开一个`Polyglot Notebook`文件,打开一个\"终端\", 切换到 \"nuget\"项:打开一个UI管理窗口。如下图:\n", "\n", "" ] }, { "cell_type": "markdown", "id": "c110c37f", "metadata": {}, "source": [ "## 导入 NuGet 包" ] }, { "cell_type": "markdown", "id": "7eecdf67", "metadata": {}, "source": [ "在`.NET Interactive`中,C#和F#核允许你使用`#r nuget`魔法命令将NuGet包导入到你的交互式会话中。两种语言的语法相同。" ] }, { "cell_type": "markdown", "id": "73546727", "metadata": {}, "source": [ "+ 导入最新版本的包,使用` #r nuget` 而无需指定版本号:" ] }, { "cell_type": "code", "execution_count": 1, "id": "ede3455f", "metadata": { "polyglot_notebook": { "kernelName": "csharp" } }, "outputs": [ { "data": { "text/html": [ "