Skip to content

Publish-Module, Save-Module and Install-Module do not work with pre-release module, which depends on another pre-release module #85

@kamennikolov

Description

@kamennikolov

We're trying to make a pre-release of our product which contains multiple modules, that depend on each other. We can successfully publish the first pre-release module which has no dependencies, but when we upload the next one, which depends on the we get an error saying that:
Publish-PSArtifactUtility : PowerShellGet cannot resolve the module dependency 'VMware.VimAutomation.Sdk' of the module
'VMware.VimAutomation.Common' on the repository 'PSGallery'. Verify that the dependent module 'VMware.VimAutomation.Sdk' is available in the
repository 'PSGallery'. If this dependent module 'VMware.VimAutomation.Sdk' is managed externally, add it to the ExternalModuleDependencies entry in the PSData section of the module manifest."

It turns out that the -AllowPreRelease parameter is not properly propagated down the stack. Even after we fixed Publish-Module locally and managed to upload all the modules Save-Module and Install-Module do not work for the same reason. Customers will only be able to download the first module, which has not dependencies.

Expected Behavior

Module should publish and install without errors.

Current Behavior

Publish-PSArtifactUtility : PowerShellGet cannot resolve the module dependency 'VMware.VimAutomation.Sdk' of the module
'VMware.VimAutomation.Common' on the repository 'PSGallery'. Verify that the dependent module 'VMware.VimAutomation.Sdk' is available in the
repository 'PSGallery'. If this dependent module 'VMware.VimAutomation.Sdk' is managed externally, add it to the ExternalModuleDependencies entry in the PSData section of the module manifest."

Possible Solution

-AllowPreRelease parameter should be properly propagated down the stack

Steps to Reproduce (for bugs)

Find-Module VMware.PowerCLI -AllowPrerelease | Install-Module

Context

We're trying to make a pre-release of our product which contains multiple modules, that depend on each other.

Your Environment

PS C:\windows\system32> $PSVersionTable

Name Value


PSVersion 5.1.15063.786
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.15063.786
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

PS C:\windows\system32> Get-Module -ListAvailable PowerShellGet,PackageManagement

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version Name ExportedCommands


Script 1.1.7.0 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
Script 1.6.0 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}
Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}

PS C:\windows\system32> Get-PackageProvider

Name Version DynamicOptions


msi 3.0.0.0 AdditionalArguments
msu 3.0.0.0
NuGet 2.8.5.210 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag...
PowerShellGet 1.6.0.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, ...
Programs 3.0.0.0 IncludeWindowsInstaller, IncludeSystemComponent

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions