无法使用 Find-Package 获取特定包的所有版本 [英] Cannot get all versions of specific package using Find-Package

查看:84
本文介绍了无法使用 Find-Package 获取特定包的所有版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 PowerShell 中使用了以下命令,我想查看特定包的版本列表,但出现错误.

Find-Package -Name "UmbracoCms" -AllVersions

<块引用>

Find-Package:未找到与指定搜索条件和包名称UmbracoCms"匹配的内容.尝试 Get-PackageSource 以查看所有可用的已注册包源.

运行 Get-PackageSource 给我:

<前>名称 ProviderName IsTrusted 位置---- ------------ --------- --------nuget.org NuGet True https://api.nuget.org/v3/index.json

有什么问题?我的错误在哪里?

我也尝试获取其他包,例如 nunit 并得到同样的东西..

解决方案

你应该使用 nuget feed v2 而不是您的 nuget feed v3 作为您的包源.

所以,这是有效的:

find-package -name "UmbracoCms" -AllVersions -Source "https://www.nuget.org/api/v2"

I used the following command in PowerShell which I want to see a list of versions for a specific package, but I get an error.

Find-Package -Name "UmbracoCms" -AllVersions

Find-Package : No match was found for the specified search criteria and package name 'UmbracoCms'. Try Get-PackageSource to see all available registered package sources.

Running Get-PackageSource gives me:

Name                             ProviderName     IsTrusted  Location
----                             ------------     ---------  --------
nuget.org                        NuGet            True       https://api.nuget.org/v3/index.json

What is the problem? Where is my mistake?

I tried to get also for other packages like nunit and get the same thing..

解决方案

You should use nuget feed v2 instead of your nuget feed v3 as your package source.

So, this works:

find-package -name "UmbracoCms" -AllVersions -Source "https://www.nuget.org/api/v2"

这篇关于无法使用 Find-Package 获取特定包的所有版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆