New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish-Module, Save-Module and Install-Module do not work with pre-release module, which depends on another pre-release module #85
Comments
@SydneyhSmith @kamennikolov I ran into a similar issue where I'm trying to publish a module that depends on a pre-release version of another module. Publish-Module throws |
@kumbham we fixed Publish-Module locally and managed to upload. |
@kamennikolov thanks for the response. Do you mind sharing me few pointers on where and how can I fix it? |
It was back in 2018. We used PowerShellGet 1.6 then. The problem was in the The fix we did locally to be able to publish the prerelease modules was at line 8607 of The fix I did then was to replace
with
another option is to add The fix shouldn't have affect non prerelease modules it should work for them as well. |
A similar issue arises when I perform |
I agree that |
This is fixed via beta10 |
Is there any chance of this fix being added as a patch to 2.x ? |
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
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
The text was updated successfully, but these errors were encountered: