[英]Find Package with source parameter is not working to get the current versions of all the nuget packages
Find Package with source parameter is not working to get the current versions of all the nuget packages 使用源参数查找包无法获取所有nuget包的当前版本
Find-Package -Source " C:\\Users\\P10410559\\source\\repos\\WebApplication4\\WebApplication4\\packages.config
" 查找包-源“
C:\\Users\\P10410559\\source\\repos\\WebApplication4\\WebApplication4\\packages.config
”
Error getting as : 错误为 :
Find-Package : The following source failed to search for packages: 'C:\Users\P10410559\source\repos\WebApplication4\WebApplication4\packages.config'
The path 'C:\Users\P10410559\source\repos\WebApplication4\WebApplication4\packages.config' for the selected source could not be resolved.
At line:1 char:1
+ Find-Package -Source "C:\Users\P10410559\source\repos\WebApplication4 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Find-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.FindPackageCommand
You are trying to search for packages inside a packages.config, which is incorrect for the following reasons - 您正尝试在packages.config中搜索软件包,由于以下原因,该软件包不正确-
Find-Package nuget.versioning -Source https://api.nuget.org/v3/index.json
If you want to get current version of all packages installed to your project you need to use the Get-Package command described here . 如果要获取安装到项目中的所有软件包的最新版本,则需要使用此处描述的Get-Package命令。 Eg -
例如-
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.