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!

Nuget packages version information not found for certain packages in VS2017



  • Hello,

    I started to work in VS2017 and I noticed a strange behavior when trying to add a fairly recent nuget package to my project.

    Some background information:
    I wanted to add swashbuckly.aspnetcore to my .NET Core 2.0 project.
    I use a nuget feed defined in proget to get my packages.
    When I start searching in Visual Studio 2017 for this package, I get a search result back without version information and I can't start the install.

    When I try to add the package in the package management console ( again pointing to proget Nuget feed) I get a message back, cannot find the package.

    But if I specify the version, it does work! So apparent retrieving the version info for this package is problematic?

    When I switch to the official feed (nuget.org), I do get the version information and I am also able to install the package without specifying the version

    Finally when I go to the web interface of Proget, the package is listed and availibe to install.

    I understand that this maybe is not your problem, but I hope to get a clue what the problem is.
    I know that Nuget 4.0 is used in Visual Studio 2017 and is it maybe something in the api communication that proget uses that is different from https://api.nuget.org/v3/index.json

    Any information you can provide me would be usefull

    Product: ProGet
    Version: 4.7.14



  • The internal NuGet API (the so called "v3 API") is supposed to be totally fully compatible with the public API (v2).

    So, there are two possibilities: the APIs do produce different results (Microsoft's problem), or ProGet is querying incorrectly (Inedo's problem).

    Can you connect VS to the "v2" URL (/api/v2), and see if it works? If not, please use Fiddler to find the precise URL that is not producing the appropriate behavior. With this, we can furthere investigate.

    Otherwise, if the v2 and v3 api don't work, then you'll need to report this to Microsoft.



  • Thank for the fast response

    I have been further investigating the issue and I saw the following result:

    Testing against the 'official' v2 api :

    PM> find-package swashbuckle.aspnetcore

    Id Versions


    Swashbuckle.AspNetCore {1.0.0}
    Swashbuckle.AspNetCore.SwaggerGen {1.0.0}
    Swashbuckle.AspNetCore.Swagger {1.0.0}
    Swashbuckle.AspNetCore.SwaggerUi {1.0.0}
    Carable.Swashbuckle.AspNetCore.D... {1.0.0}
    Swashbuckle.AspNetCore.Examples {2.3.1}
    SwashBuckle.AspNetCore.Microsoft... {0.4.0}

    When testing 'official' V3 API : same result.

    When testing against a proget nuget feed:
    PM> find-package swashbuckle.aspnetcore

    Id Versions


    Swashbuckle.AspNetCore
    Swashbuckle.AspNetCore.SwaggerGen
    Swashbuckle.AspNetCore.Swagger
    Swashbuckle.AspNetCore.SwaggerUi
    Carable.Swashbuckle.AspNetCore.D... {1.0.0}
    Swashbuckle.AspNetCore.Examples {2.3.1}
    SwashBuckle.AspNetCore.Microsoft... {0.4.0}

    You see 4 packages are not able to report their version information.

    It is strange because the Proget website does show the version information...

    For now this is not a blocking issue for me because it is enough to specify a version number and it works!

    Hopefully this can be solved, at least you know about it now, :-)

    Good day!


  • inedo-engineer

    Hello Stijn,

    This issue is caused by a hidden version of the package: https://www.nuget.org/packages/Swashbuckle.AspNetCore/1.0.0--rc1.

    I've filed this as PG-1146 and will submit a fix for my co-workers to review.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation