Skip to content
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

Module Manifest/Nuspec Version Mismatch #161

Open
jyonke opened this issue Sep 18, 2021 · 2 comments
Open

Module Manifest/Nuspec Version Mismatch #161

jyonke opened this issue Sep 18, 2021 · 2 comments

Comments

@jyonke
Copy link

jyonke commented Sep 18, 2021

Describe the bug
Installing cChoco outside of the PSGallery results in an invalid module being installed

To Reproduce
Steps to reproduce the behavior:

  1. Download the raw nupkg from the PSGallery.
  2. Upload to internal hosted repository (ex: Sonatype Nexus - Nuget v2).
  3. Register internal PowerShell repository .
  4. Install cChoco Module from internal repository.
  5. Import Module or Get-DSCResource

Expected behavior
The Module imports with the proper version and is recognized as a valid DSCResource

Software (please complete the following information):

  • OS: Microsoft Windows 10 20H2 19042.1237
  • PowerShell Version: 5.1.19041. 1237
  • PowerShellGet Module: 1.0.0.1

Additional context
This seems to be a result of the NuGet standards omitting the 4th version identifier if it is 0. The result is the wrong path being created when installing the module and then when importing the path and module manifest versions are not matched. If the Module Manifest is modified to version 2.5.0 or the path is updated to 2.5.0.0 the module imports as expected. A potential fix would be to limit the module manifest version to major.minor.patch if the revision value is 0, or increment the revision value to major.minor.patch.1 as the minimum version at build time.

https://docs.microsoft.com/en-us/nuget/concepts/package-versioning#normalized-version-numbers

Screenshots

Results From Internal Repository
Internal Install

Results from PSGallery
PSGallery Install

Import with Updated Module Manifest
Import - Updated psd1

Current Module Manifest
2 5 0 0 psd1

Current Nuspec
2 5 0 Nuspec

@FLeven
Copy link

FLeven commented Oct 27, 2022

Could someone merge some PR's and make it a 2.5.0.1 ? I also like to install the module to some offline servers from an internal nexus oss.

@jackmtpt
Copy link

This is still an issue when using Nexus Repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants