我正在使用.NET Core,VS Code,Linux。
要更新包,我手动更改.csproj
中的版本,然后运行dotnet restore
。
但是如何使用dotnet
CLI 判断哪些软件包已过时?
在没有安装任何其他工具的情况下,我使用了以下命令:
dotnet list package --outdated
https://github.com/NuGet/Home/wiki/dotnet-list-package
我不相信原版.NET Core中有任何内容,但是我找到了一个名为NuKeeper的.NET Core全局工具,它可以做你想要的:
# Install the global tool
$ dotnet tool install --global NuKeeper
# Run the tool to inspect a project in the current directory for updated dependencies
$ NuKeeper inspect
它还可以为您执行更新 - 有关示例等,请参阅上面的链接。
(我今天之前没有使用过这个,但我刚刚在一个示例项目中尝试过它,它给了我我期望的信息。
您还可以使用dotnet outdated
全局工具。
https://github.com/jerriep/dotnet-outdated
dotnet tool install --global dotnet-outdated
dotnet outdated