尝试运行Register-PsRepository
时,我遇到了以下错误我试过了:
任何想法?
PS C:\> Register-PSRepository -Name MyRepo -SourceLocation https://MyRepo.com/api/Myrepo -Credential $c
PackageManagement\Register-PackageSource : The property 'Name' cannot be
found on this object. Verify that the property exists.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.6.0\PSModule.psm1:4631 char:17
答案 0 :(得分:0)
请检查PSRepository配置xml文件:
%LOCALAPPDATA%\微软\ Windows \ PowerShell的\ PowerShellGet \ PSRepositories.xml
文件可能已损坏,可能导致您遇到错误。