.net - .NET Interactive Notebooks: How do I overwrite a nuget package version?
问题描述
I'm using .NET notebooks for VSCode. Current version: v1.0.2419011
I'm trying to experiment with a nuget package
I first loaded the package like
#r "nuget: Microsoft.CodeAnalysis.Workspaces.MSBuild"
Then I realized I needed a preview version
#r "nuget: Microsoft.CodeAnalysis.Workspaces.MSBuild, 4.0.0-3.final"
However, the notebook won't let me change versions of the package. It errors with
Error: Microsoft.CodeAnalysis.Workspaces.MSBuild version 4.0.0-1.final cannot be added because version 3.11.0 was added previously.
I don't see any options for clearing the packages or forcing an overwrite. How do I change package versions after previously loading a different version?
解决方案
Turns out the same question got asked in the project's Github issues, #342.
The answer is to restart the notebook kernel. Restarting the kernel is slightly out of the way. It can be run through the command search (ctrl + shift + p)
推荐阅读
- python - 数据框的条件合并
- vb.net - 使用 XPath 提取子字符串,其中字段中可能没有尾随分隔符
- orientdb - 有没有办法在 OrientDB 中将 ISO 8601 兼容日期设置为 DateTime 格式?
- javascript - 渲染存储在数据库中的 javascript
- ethereum - 如何从以太坊地址获取 ERC20、ERC721 和 ERC827 代币列表
- python - VRPTW:如何处理特殊仓库节点的时间窗口和松弛?
- wpf - PowerShell/WPF:单击时禁用按钮
- regex - Vim:如何改变短语(不同类型和长度)环境
- javascript - jSignature 不是函数
- html - 在这种情况下了解溢出和浮动