Manage NuGet Packages on NuGet Local Feed isn't finding latest package version

Bug reports.
User avatar
Stub
Posts: 265
Joined: Fri Jul 15, 2016 1:35 pm

Manage NuGet Packages on NuGet Local Feed isn't finding latest package version

Post by Stub » Tue Jun 25, 2019 9:00 am

We have a NuGet Local Feed here, to which I build and deploy some internal libraries we share between tools and applications.

I've been using v2.0.2.9 of one such library in my Ranorex test project. But upon upgrading to Ranorex v9.1.0 I discovered a problem which I think I've rectified in the library. So I built and published a new build to our NuGet Local Feed, v2.0.2.45. Unfortunately Ranorex is struggling to see v2.0.2.45, and only lists v2.0.2.9 in the Manage Packages dialog.

So this was puzzling because I can clearly see v2.0.2.45 as the latest stable release in Visual Studio when I attempt to add my NuGet package to some VS2017 project. Then I moved the v2.0.2.9 folder out of the way, and suddenly Ranorex can see v2.0.2.45 of our library.

It turns out if my version I have the following folders in my NuGet Local Feed, then v2.0.2.9 is shown by Ranorex:
RanorexNuGet2029.png
RanorexNuGet2029.png (1.2 KiB) Viewed 270 times
But if I rename the folder from "2.0.2.9" to "2.0.2.09" then suddenly Ranorex can 'see' my newest build v2.0.2.45.
RanorexNuGet20209.png
RanorexNuGet20209.png (1.24 KiB) Viewed 269 times
In each image I've selected the version that Ranorex sees.

This seems wrong to me. It's different to what Visual Studio does. I'll have to hack the version numbers in my libraries artificially to make them visible to Ranorex, because I don't believe I can get the NuGet package deployment mechanism to label the file as "2.0.2.09", and anyway, there may be other references to that library elsewhere in our system.
Attachments
RanorexNuGet20209.png
RanorexNuGet20209.png (1.24 KiB) Viewed 268 times
Last edited by Stub on Tue Jun 25, 2019 9:05 am, edited 1 time in total.

User avatar
Stub
Posts: 265
Joined: Fri Jul 15, 2016 1:35 pm

Re: Manage NuGet Packages on NuGet Local Feed isn't finding latest package version

Post by Stub » Tue Jun 25, 2019 9:05 am

Oh my gosh, editing posts with inline attachments is a frustrating experience with this forum. It keeps saying my image is no longer available. Hacking in attachment numbers finally worked. I'm not touching that post again!

User avatar
RobinHood42
Posts: 302
Joined: Fri Jan 09, 2015 3:24 pm

Re: Manage NuGet Packages on NuGet Local Feed isn't finding latest package version

Post by RobinHood42 » Tue Jun 25, 2019 9:45 am

Hi Stub,

Did you try to turn on "Include prerelease" ?
Manage packages.png
Manage packages.png (11.02 KiB) Viewed 255 times
Cheers,
Robin

User avatar
Stub
Posts: 265
Joined: Fri Jul 15, 2016 1:35 pm

Re: Manage NuGet Packages on NuGet Local Feed isn't finding latest package version

Post by Stub » Tue Jun 25, 2019 10:38 am

Yes, I did fiddle with that when I was attempting to get Ranorex to see my latest build, but it didn't make any difference. It was only when I removed the "2.2.0.9" folder that it sprang back into life. That's when it dawned on me that SharpDevelop or Ranorex, whomever is responsible for the Manage Packages UI, may be doing a string comparison on the versions. so "2.2.0.9" > "2.2.0.45" perhaps?

User avatar
RobinHood42
Posts: 302
Joined: Fri Jan 09, 2015 3:24 pm

Re: Manage NuGet Packages on NuGet Local Feed isn't finding latest package version

Post by RobinHood42 » Wed Jun 26, 2019 8:07 am

Hi,
may be doing a string comparison on the versions. so "2.2.0.9" > "2.2.0.45" perhaps?
That's highly possible. Did you try to install the package using the Nuget Package Management Console ? E.g.:
Install-Package MyPackage -Version 2.2.9
Cheers,
Robin

User avatar
Stub
Posts: 265
Joined: Fri Jul 15, 2016 1:35 pm

Re: Manage NuGet Packages on NuGet Local Feed isn't finding latest package version

Post by Stub » Wed Jun 26, 2019 9:58 am

No. I must admit unfamiliarity with the NuGet Package Management Console. I just renamed the folder on our NuGet Local Feed, and then installed the correct version of our libraries into Ranorex. When everything was building successfully, I reverted the renamed folder back again. Simple enough, as long as I remember this trick next time I update things!

I tend to find that "Upgrade" a NuGet package is fraught with problems in the Ranorex UI. I've twice done so with these libraries in Ranorex and it never works successfully - not sure why though. Nowadays I just remove then re-install the correct version, which is what led to observing this problem.