Latest version of nuget package still not up to date

孤人 提交于 2021-01-28 05:02:44

问题


We are using our own nuget server on the local network. I've got a dotnet standard 2.0 library which I'm packaging via nuget. Currently it's at 1.0.5.4 (both File version and Assembly version).

However when I install it in another solution it's missing a property that I added in the latest version increment. When I F12 on a class of that nuget it reads at the top:

    #region Assembly lib-mycode-async, Version=1.0.5.1, Culture=neutral, PublicKeyToken=null
    // C:\Users\{Username}\.nuget\packages\lib.mycode\1.0.5.4\lib\netstandard2.0\lib-mycode-async.dll
    #endregion

In the nuget Manager GUI of Visual Studio it says 1.0.5.4 everywhere. I uninstalled the nuget from all projects of the solution,

  • uninstalled any other package that used that particular nuget
  • did Update-Package -reinstall to reinstall all nuget packages in the solution
  • closed and reopened Visual Studio (2019 but also remember having had this with 2017)
  • rebuild the nuget packages
  • cleaned the nuget package cache in Options > Nuget Package Manager > General > Clear All NuGet Cache(s)

Why does it appear to be up to date everywhere and still I cannot use the latest code changes?


回答1:


While writing the question I followed the path in the meta data. The .dll file the path points to indeed had the version 1.0.5.1 so I deleted the entire folder lib.mycode in C:\Users\{Username}\.nuget\packages.

I rebuild my solution, closed VS 2019 and reopened the solution.

Now the folder was back but with the right version. The code was finally there which I added in the latest version of my nuget package.

I really thought that this would have been taken care of by the last point I tried out in the question above!



来源:https://stackoverflow.com/questions/55575713/latest-version-of-nuget-package-still-not-up-to-date

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!