nuget 包的最新版本仍然不是最新的 [英] Latest version of nuget package still not up to date
问题描述
我们在本地网络上使用我们自己的 nuget 服务器.我有一个 dotnet 标准 2.0 库,我正在通过 nuget 打包它.目前它是 1.0.5.4(文件版本和程序集版本).
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).
但是,当我在另一个解决方案中安装它时,它缺少我在最新版本增量中添加的属性.当我在那个 nuget 的类上按 F12 时,它会在顶部显示:
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
在 Visual Studio 的 nuget Manager GUI 中,到处都是 1.0.5.4.我从解决方案的所有项目中卸载了 nuget,
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,
- 卸载使用该特定 nuget 的任何其他软件包
- did
Update-Package -reinstall
重新安装解决方案中的所有 nuget 包 - 关闭并重新打开 Visual Studio(2019 年,但也记得在 2017 年有过这个)
- 重建 nuget 包
- 在选项">Nuget 包管理器">常规">清除所有 NuGet 缓存"中清理了 nuget 包缓存
- 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?
推荐答案
在编写问题时,我遵循了元数据中的路径.路径指向的 .dll 文件确实有 1.0.5.1 版本,所以我删除了 C:\Users\{Username}\.nuget\packages
中的整个文件夹 lib.mycode
代码>.
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
.
我重建了我的解决方案,关闭了 VS 2019 并重新打开了解决方案.
I rebuild my solution, closed VS 2019 and reopened the solution.
现在文件夹又回来了,但版本正确.代码终于出现了,我将其添加到了我的 nuget 包的最新版本中.
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!
这篇关于nuget 包的最新版本仍然不是最新的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!