简体   繁体   English

NuGet package 更新 - Package 经理找到另一个同名的 package

[英]NuGet package update - Package Manager found another package with same name

I'm quite new to NuGet Package building and publishing so maybe there's something I'm doing wrong, but I can't figure out what is it.我对 NuGet Package 构建和发布还很陌生,所以也许我做错了什么,但我不知道是什么。

I have a VS2022 solution which contains my reference projects.我有一个 VS2022 解决方案,其中包含我的参考项目。 "Project A" is being published locally on my.network as a NuGet package (not on nuget.org). “项目 A”在 my.network 上本地发布为 NuGet package(而不是 nuget.org)。

Another solution which I'm currently working on, uses that Project A package via NuGet. The problem is: on NuGet.org there's another package with the same name, so when I open Package Manager window the Update tab shows me an available update for that project - but that's not my package because it comes from nuget.org.我目前正在研究的另一个解决方案是通过 NuGet 使用该项目 A package。问题是:在 NuGet.org 上还有另一个同名的 package,所以当我打开 Package 管理器时,更新选项卡 window 显示可用更新那个项目 - 但那不是我的 package,因为它来自 nuget.org。 The "silly fix" is obviusly to change package source from the combobox, instead of "All" I set "local" and then the correct package is found. “愚蠢的修复”显然是从 combobox 更改 package 源,而不是我设置“本地”的“全部”,然后找到正确的 package。

What am I missing here?我在这里错过了什么? Project A is set with "sign package" on properties, if that matters.如果重要的话,项目 A 在属性上设置为“签名包”。

I think you can try to change the name of your Project A, it will be a good choice to solve this problem.我想你可以尝试改变你的项目A的名称,这将是解决这个问题的一个不错的选择。

If you don't use the packages from nuget.org you can uncheck this source in Tools > Options > NuGet Package Manager > Package Source:如果您不使用来自 nuget.org 的软件包,您可以在工具 > 选项 > NuGet Package 管理器 > Package 中取消选中此来源来源: 在此处输入图像描述

You can search the version of your package like this:您可以像这样搜索 package 的版本: 在此处输入图像描述 在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM