显示 NuGet 包的依赖项
当您显示“管理 NuGet 包”对话框时,它将显示可用的包,其中包含的信息比 powershell 中明显提供的信息多得多。
特别是,有没有一种方法可以从 powershell 中列出可用的包 - 或者只是一个特定的包 - 以及它们所依赖的包,最好是它们的目标版本(范围)?
When you show the Manage NuGet Packages dialog box, it will show the available packages with a lot more information than is apparently available than from the powershell.
In particular, is there a way from the powershell which will list the available packages - or just a single specific package - with the packages they are dependent on, ideally with their target version (ranges)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
是的,有。
Yes, there is.
对于运行 Nuget v3 或更高版本(即 VS2015)的任何人,如果运行命令
Get-Package
,您将收到以下消息:Find-Package
很好地解释了新命令,您可以看到不再有-list
参数。不幸的是,似乎新的和旧的都不会给你依赖。您可以看到返回的所有属性,如下所示:将返回:
For anyone running Nuget v3 or higher (i.e. VS2015), if you run the command
Get-Package
, you will be given this message:The documentation for
Find-Package
explains the new command rather well, and you can see there is no longer a-list
parameter. Unfortunately it seems neither this new nor the old one will give you the dependencies. You can see all the properties returned like this:Which will return:
我用过:
https://learn .microsoft.com/en-us/powershell/module/packagemanagement/find-package?view=powershell-7.1
I used:
https://learn.microsoft.com/en-us/powershell/module/packagemanagement/find-package?view=powershell-7.1