如何在.NET交互式笔记本中包括项目参考?
使用NET 6 i具有以下项目结构:
nuget.config
project.code-workspace
- Core
Core.csproj
- Api
Api.csproj
- Sim
notebook.ipynb
where Notebook.ipynb
现在仅是:
#i "nuget:https://api.nuget.org/v3/index.json"
#r "nuget:Microsoft.Data.Analysis,0.*"
using System;
using Microsoft.Data.Analysis;
Console.WriteLine("Hello World!");
如何在Note> Notebook.ipynb
中包含对Core和API Projects的项目引用?
我需要在Notebook.ipynb
中使用一些核心和API项目类。
Using NET 6 I have the following project structure:
nuget.config
project.code-workspace
- Core
Core.csproj
- Api
Api.csproj
- Sim
notebook.ipynb
Where notebook.ipynb
is for now just:
#i "nuget:https://api.nuget.org/v3/index.json"
#r "nuget:Microsoft.Data.Analysis,0.*"
using System;
using Microsoft.Data.Analysis;
Console.WriteLine("Hello World!");
How to include a project reference to Core and Api projects in notebook.ipynb
?
I need to use some of the Core and Api project classes in notebook.ipynb
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前,这是不受欢迎的。参见 this 问题。我尝试使用
dotnet pack
并从本地文件夹安装创建的软件包,但失败了。我唯一设法完成工作的是构建解决方案并手动添加.dll:假设下一个解决方案结构:
Currently that is not supported out of the box. See this issue. I've tried to use
dotnet pack
and install created package from local folder but failed. The only I've managed to make work is to build solution and add .dll manually:Assuming next solution structure: