使用dotnet CLI显示过时的nuget软件包

时间:2018-09-03 10:20:04

标签: .net-core nuget

我正在使用.NET Core,VS Code,Linux。

要更新软件包,请在.csproj中手动更改版本,然后运行dotnet restore

但是如何使用dotnet CLI判断哪些软件包已过期?

3 个答案:

答案 0 :(得分:3)

我没有安装任何其他工具,而是使用了以下命令:

dotnet list package --outdated 

https://github.com/NuGet/Home/wiki/dotnet-list-package

答案 1 :(得分:2)

我不相信普通的.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

它也可以为您执行更新-有关示例等,请参见上面的链接。

(我以前没有使用过,但是我只是在一个示例项目中尝试过,它给了我我所期望的信息。)

答案 2 :(得分:1)

您还可以使用#include <stdio.h> #include <stdint.h> typedef union { struct { uint64_t u56:56; }; uint8_t u8[sizeof(uint64_t)]; }msg; msg *pune(msg *message, uint8_t *data, size_t datalen, int endianes) { if(endianes) { for(size_t index = 0; index < datalen; index++) { message -> u8[index] = data[index]; } } else { for(size_t index = 0; index < datalen; index++) { message -> u8[index] = data[datalen - index - 1]; } } return message; } int main() { msg message; uint8_t buf[8]={0x7,0x6,0x5,0x4,0x3,0x2,0x1}; printf("buf=%llx\n",pune(&message, buf, 7, 1) -> u56); printf("buf=%llx\n",pune(&message, buf, 7, 0) -> u56); return 0; } 全局工具。

https://github.com/jerriep/dotnet-outdated

dotnet outdated