Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Leading 0 before the version is remove when package is add in a feed



  • Hi,

    When we push a package to a nuget feed with version 2.7.5.046 the proget server remove the leading 0 at the from of the number. when trying to get the package in visual studio 2017
    package name mycompany.BusinessEntities.2.7.5.046.nupkg
    with get error:

    ..\nuget_4_5_1.exe install Mycompany.BusinessEntities -Version 2.7.5.46 -Source http://nuget.mycompany.com:8888/nuget/Release/
    Feeds used:
    C:\Users\Username.nuget\packages
    http://nuget.mycompany.com:8888/nuget/Release/

    Attempting to gather dependency information for package 'Mycompagny.BusinessEntities.2.7.5.46' with respect to project 'C:\Users\Username\Downloads\test', targeting 'Any,Version=v0.0'
    Gathering dependency information took 244.79 ms
    Attempting to resolve dependencies for package 'Mycompagny.BusinessEntities.2.7.5.46' with DependencyBehavior 'Lowest'
    Resolving dependency information took 0 ms
    Resolving actions to install package 'Mycompagny.BusinessEntities.2.7.5.46'
    Resolved actions to install package 'Mycompagny.BusinessEntities.2.7.5.46'
    Retrieving package 'Mycompagny.BusinessEntities 2.7.5.46' from 'http://nuget.mycompany.com:8888/nuget/Release/'.
    GET http://nuget.mycompany.com:8888/nuget/Release/package/Mycompagny.BusinessEntities/2.7.5.046
    NotFound http://nuget.mycompany.com:8888/nuget/Release/package/Mycompagny.BusinessEntities/2.7.5.046 67ms
    WARNING: Install failed. Rolling back...
    Executing nuget actions took 121.75 ms
    ..\nuget_4_5_1.exe : Package 'Mycompagny.BusinessEntities.2.7.5.46' is not found on source 'http://nuget.mycompany.com:8888/nuget/Release/'.
    At line:1 char:1

    • ..\nuget_4_5_1.exe install Mycompagny.BusinessEntities -Version ...
    •   + CategoryInfo          : NotSpecified: (Package 'AppFra...uget/Release/'.:String) [], RemoteException
        + FullyQualifiedErrorId : NativeComm
        
        the file is not found because the proget server don't have the package 2.7.5.046 because the 0 was remove when the package is add and the .nuspec version have that 2.7.5.046
        
        who i can fix that error, we have a lot of package that have the 0 before the digit and i don't what to repackage all of them.
        
        Patrick
      
      

    Product: ProGet
    Version: 5.0.10


  • inedo-engineer

    Are you using a "Legacy NuGet Feed" (created in v4), or is this a "new" (SemVer2) NuGet feed?

    Leading zeros are no longer supported by Microsoft for NuGet packages, nor the ProGet SemVer2 feeds. So if you are still using them in your process, you really ought to change your process to use semantic versioning.



  • Hi,

    Is a legacy feed (proget 3.1.6.1), we import it in a new nuget feed in proget 5.0.

    Patrick



  • If you're using a NuGet feed in ProGet v5, then it does not support leading zeros. You can use a legacy feed or an old version of ProGet if you really really need to keep this quirky legacy process....



  • Thank you
    with version 4.8.12, it's working.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation