-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
Steps to reproduce
- Configure Artifactory with a remote feed pointing at PSGallery
- Connect to said feed with PSResourceGet (using NuGet v2)
- Install a package with dependencies (e.g.
Microsoft.Graph.Teams, which depends onMicrosoft.Graph.Authentication)
Expected behavior
PS> Install-PSResource Microsoft.Graph.Teams -Repository Artifactory
PS> <# module installs without issue #>Actual behavior
Install-PSResource: Package(s) 'microsoft.graph.teams' could not be installed from repository 'Artifactory-Remote'.Error details
PS> Get-Error
Exception :
Type : Microsoft.PowerShell.PSResourceGet.UtilClasses.ResourceNotFoundException
Message : Package(s) 'microsoft.graph.teams' could not be installed from repository 'Artifactory-Remote'.
HResult : -2146233088
TargetObject : Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource
CategoryInfo : InvalidData: (Microsoft.PowerShel…s.InstallPSResource:InstallPSResource) [Install-PSResource], ResourceNotFoundException
FullyQualifiedErrorId : InstallPackageFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource
InvocationInfo :
MyCommand : Install-PSResource
ScriptLineNumber : 1
OffsetInLine : 1
HistoryId : 4
Line : install-psresource microsoft.graph.teams -Repository Artifactory-Remote -debug -Reinstall
Statement : install-psresource microsoft.graph.teams -Repository Artifactory-Remote -debug -Reinstall
PositionMessage : At line:1 char:1
+ install-psresource microsoft.graph.teams -Repository Artifactory-Remo …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
InvocationName : install-psresource
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo :Environment data
PS> Get-Module Microsoft.PowerShell.PSResourceGet; $PSVersionTable | ft
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Binary 1.1.0.1 Microsoft.PowerShell.PSResourceGet {Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository, Get-PSScriptFileInfo…}
Name Value
---- -----
PSVersion 7.4.1
PSEdition Core
GitCommitId 7.4.1
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
Running the command with $DebugPreference="Continue" yields the following:
PS> install-psresource microsoft.graph.teams -Repository Artifactory-Remote -Reinstall
DEBUG: In InstallPSResource::ProcessInstallHelper()
DEBUG: In InstallHelper::BeginInstallPackages()
DEBUG: Parameters passed in >>> Name: 'microsoft.graph.teams'; VersionRange: ''; NuGetVersion: ''; VersionType: 'NoVersion'; Version: ''; Prerelease: 'False'; Repository: 'Artifactory-Remote'; AcceptLicense: 'False'; Quiet: 'False'; Reinstall: 'True'; TrustRepository: 'False'; NoClobber: 'False'; AsNupkg: 'False'; IncludeXml 'True'; SavePackage 'False'; TemporaryPath ''; SkipDependencyCheck: 'False'; AuthenticodeCheck: 'False'; PathsToInstallPkg: 'C:\Users\sewilliams\Documents\PowerShell\Modules,C:\Users\sewilliams\Documents\PowerShell\Scripts'; Scope 'CurrentUser'
DEBUG: In InstallHelper::ProcessRepositories()
DEBUG: In InstallHelper::InstallPackages()
DEBUG: In InstallHelper::InstallPackage()
DEBUG: In V2ServerAPICalls::FindName()
DEBUG: In V2ServerAPICalls::HttpRequestCall()
DEBUG: Request url is 'https://artifactory.f.q.d.n/artifactory/api/nuget/v2/psgallery-nuget-remote/FindPackagesById()?id='microsoft.graph.teams'&$inlinecount=allpages&$filter=IsLatestVersion'
DEBUG: In V2ServerAPICalls::InstallVersion()
DEBUG: In V2ServerAPICalls::HttpRequestCallForContent()
DEBUG: Request url is 'https://artifactory.f.q.d.n/artifactory/api/nuget/v2/psgallery-nuget-remote/Download/Microsoft.Graph.Teams/2.17.0'
DEBUG: In InstallHelper::TryInstallToTempPath()
DEBUG: In InstallHelper::CallAcceptLicense()
DEBUG: In InstallHelper::DeleteExtraneousFiles()
DEBUG: Deleting 'C:\Users\sewilliams\AppData\Local\Temp\0c008ba5-d731-496e-8d8a-76a5f9242456\microsoft.graph.teams\2.17.0\Microsoft.Graph.Teams.nuspec'
DEBUG: Deleting 'C:\Users\sewilliams\AppData\Local\Temp\0c008ba5-d731-496e-8d8a-76a5f9242456\microsoft.graph.teams\2.17.0\[Content_Types].xml'
DEBUG: Deleting 'C:\Users\sewilliams\AppData\Local\Temp\0c008ba5-d731-496e-8d8a-76a5f9242456\microsoft.graph.teams\2.17.0\_rels'
DEBUG: Deleting 'C:\Users\sewilliams\AppData\Local\Temp\0c008ba5-d731-496e-8d8a-76a5f9242456\microsoft.graph.teams\2.17.0\package'
DEBUG: In InstallHelper::CreateMetadataXMLFile()
DEBUG: In V2ServerAPICalls::FindVersionGlobbing()
DEBUG: In V2ServerAPICalls::FindVersionGlobbing()
DEBUG: In V2ServerAPICalls::HttpRequestCall()
DEBUG: Request url is 'https://artifactory.f.q.d.n/artifactory/api/nuget/v2/psgallery-nuget-remote/FindPackagesById()?id='Microsoft.Graph.Authentication'&$orderby=NormalizedVersion desc&$inlinecount=allpages&$skip=0&$filter= and NormalizedVersion ge '2.17.0' and NormalizedVersion le '2.17.9''
DEBUG: Response is empty
DEBUG: Found package 'Microsoft.Graph.Teams' version '2.17.0'
Install-PSResource: Package(s) 'microsoft.graph.teams' could not be installed from repository 'Artifactory-Remote'.The request URL is the problem here. The string and NormalizedVersion ge '2.17.0' and NormalizedVersion le '2.17.9' is not a valid OData filter.
Reactions are currently unavailable