none
How to notify user nuget packages used in another nuget package need to be upgrade? RRS feed

  • Question

  • Hi.

    I wrote a nuget package which referenced other nuget packages.

    When user references my package, though all other packages will be added automatically, but no notify shown for those upgrades. When the package I referenced has a upgrade, nothing will be shown in user's VS project.

    Any idea to let user upgrade those packages?

    Thanks.

    Monday, October 8, 2018 9:57 AM

Answers

  • Hi EternalSnow,

    Thank you for your update.

    For the .NET Standard and .NET Core projects, your result is expected which works by designed.

    After you installed your nuget package, you can found the Installed tab only list your customer package, not includes the dependencies, which is simply by the nuget package team, we can only found those dependencies under the file xxx/ClassLibrary1\ClassLibrary1\obj/project.assets.json, the solution keeps the lowest version of the dependency packages. Please have a look those discussions:

    List transitive dependency updates and allow manual update 

    Allow users to determine package resolution strategy during package restore - direct or transitive

    Best regards,

    Sara


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Marked as answer by EternalSnow Monday, October 22, 2018 8:24 AM
    Monday, October 22, 2018 8:22 AM
    Moderator

All replies

  • Hi EternalSnow,

    Welcome to the MSDN forum.

    Normally, the VS auto check the installed nuget package version, no matter it is be referenced or directly install by us.

    Which package did you reference? Please right click the project name and choose ‘Manage Nuget Package…’-Updates, click the setting button of Package source at the right corner, check the available package sources and then search the referenced package ID/name in those available package sources to check there have a higher version or not:

    I made a test in my side and install the package: Microsoft.Owin.Host.SystemWeb with a lower version 3.0.0, it depends on Microsoft.Owin 3.0.0. After that, I found under ‘Update’ tab, there have the update reminder for Microsoft.Owin since there have a higher version: 4.0.0.

    Best regards,

    Sara


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, October 22, 2018 7:06 AM
    Moderator
  • Thanks for your reply.

    But actually, VS won't do that.

    Step to repo:

    1 Create a project with Class Library (.Net Standard).

    2 Add a Nuget Package reference, like SecretNest.CSharpRoslynAgency, which referenced Microsoft.CodeAnalysis.Common 2.4.0.

    3 Check the Nuget Update. Through the latest version of Microsoft.CodeAnalysis.Common is 2.9.0, nothing listed in Updates.

    Monday, October 22, 2018 7:15 AM
  • Hi EternalSnow,

    Thank you for your update.

    For the .NET Standard and .NET Core projects, your result is expected which works by designed.

    After you installed your nuget package, you can found the Installed tab only list your customer package, not includes the dependencies, which is simply by the nuget package team, we can only found those dependencies under the file xxx/ClassLibrary1\ClassLibrary1\obj/project.assets.json, the solution keeps the lowest version of the dependency packages. Please have a look those discussions:

    List transitive dependency updates and allow manual update 

    Allow users to determine package resolution strategy during package restore - direct or transitive

    Best regards,

    Sara


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Marked as answer by EternalSnow Monday, October 22, 2018 8:24 AM
    Monday, October 22, 2018 8:22 AM
    Moderator