Can't pull a nuget package with build version

Summary

When using the NuGet Repository from the GitLab Packages Registry, NuGet packages with build information can't be pulled.

Steps to reproduce

  1. Have a nuget package with an extended build information. Example: foo.bar.1.4.2+7.nupkg
  2. Have a NETStandard.Library project
  3. Setup the GitLab source
  4. Try to pull the package
  5. Visual Studio will fail with something similar to this:
The feed 'sandbox [http://gdk.test:8000/api/v4/projects/1/packages/nuget/index.json]' lists package 'Foo.Bar.1.4.2' but multiple attempts to download the nupkg have failed. The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again.

Be sure to clear the nuget cache before pulling the package with nuget locals all -clear

Example Project

https://gitlab.com/10io/NugetInstall

What is the current bug behavior?

  • The nuget package can't be downloaded

What is the expected correct behavior?

  • The nuget package should be downloaded and installed

Output of checks

This bug happens on GitLab.com

Possible fixes

  • It seems that nuget will ignore the extended build information +3 and send the semantic version string without it. So 1.2.3+6 will end up in a request with 1.2.3.
    • This should be investigated with a proxy to analyze the requests made by nuget.
  • The GitLab Packages Registry uses strict version string matching to find a package, that's why it ends up in a 404.