Nuget List-Package错误

时间:2011-11-21 18:08:36

标签: nuget nuget-package

我尝试在Package Manager控制台中执行“List-Package”并在Nuget包中获得以下错误。

The term 'List-Package' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
 verify that the path is correct and try again.

At line:1 char:13
+ List-Package <<<< 
    + CategoryInfo          : ObjectNotFound: (List-Package:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

我输入了get-help Nuget以查看所有可用的Nuget命令。但是我在结果中看不到“List-Package”。

是否发生此错误是因为最新版本的Nuget不再支持List-Package命令?我们可能需要使用命令Get-package list-package而不是List-Package

导致此错误的原因是什么?

1 个答案:

答案 0 :(得分:4)

List-Package是错误的命令名称。

您应该使用Get-Package命令

Look details at docs.nuget.org