请注意:
C:\xyz\LogDbUpgradeProgress [master ≡]> Find-Package -Source \\devstatic\artifacts\nuget\packages -Name 'LogDbUpgradeProgress'
Find-Package : No match was found for the specified search criteria and package name 'LogDbUpgradeProgress'. Try Get-PackageSource to see all available
registered package sources.
At line:1 char:1
+ Find-Package -Source \\devstatic\artifacts\nuget\packages -Name 'LogD ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Power...ets.FindPackage:FindPackage) [Find-Package], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.FindPackage
但是该软件包仍然存在,Find-Package
无需过滤即可找到它:
C:\xyz\LogDbUpgradeProgress [master ≡]> Find-Package -Source \\devstatic\artifacts\nuget\packages |? { $_.Name -eq 'LogDbUpgradeProgress' }
Name Version Source Summary
---- ------- ------ -------
LogDbUpgradeProgress 1.0.0 xyz Repo Logs the progress of the DbUpgrade tool to a file, which can later be used to send AppIns...
C:\xyz\LogDbUpgradeProgress [master ≡]>
如何配置系统,以便Find-Package
在共享文件夹存储库中按名称查找软件包?