NuGet 不更新项目引用

编程入门 行业动态 更新时间:2024-10-26 22:19:26
本文介绍了NuGet 不更新项目引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我最近将我所有的 Visual Studio 2013 项目迁移到 Visual Studio 2015 并按照此 文章 由 Nuget 以确保自动包恢复仍然有效,简而言之

I recently migrated all my Visual Studio 2013 projects to Visual Studio 2015 and followed the steps documented in this article by Nuget to make sure that automatic package restore is still working, in short

  • 我从源代码管理和磁盘中删除了 Nuget.exe 和 Nuget.target 文件
  • 我更新了所有项目文件并删除了与 Nuget 相关的部分

我在更新 Nuget 包时遇到问题,它没有更新项目引用以指向最新的 dll 版本.我可以看到安装了最新的软件包.此问题也与特定包无关.

I'm experiencing a problem when I'm updating Nuget packages, it is not updating the project references to point to the newest dll versions. I can see that the newest packages was installed though. This problem is also not related to specific packages.

有没有其他人遇到过这样的问题?

Has anyone else experienced a problem like this?

推荐答案

我们意识到我们的一些初级开发人员只为解决方案中的一个项目安装了所需的 Nuget 包,然后他们为所有其他项目添加了对所需 dll 的引用通过浏览到 dll 在磁盘上的物理位置.这显然导致了问题,因为解决方案中只有一个项目在它的 packages.config 文件中包含 Nuget 包的条目,而解决方案中的其余项目不包含任何条目.

We realized that some of our junior developers only installed the required Nuget packages for ONE project in the solution, they then added references to the required dll's for all other projects by browsing to the physical location of the dll's on disk. This obviously caused the problem because only ONE of the projects in the solution contained entries for Nuget packages in it's packages.config file while the remaining projects in the solution contained none.

当使用 Update-Package 命令更新所有包时,只有一个项目在它的 packages.config 文件中包含条目被更新为正确的项目引用.

When all packages were updated using the Update-Package command only the ONE project containing entries in it's packages.config file were updated with the correct project references.

即使这不是 Nuget 错误,而是由经验不足引起的问题,我还是记录了一个 问题 与 Nuget 合作,看看他们是否可以改进软件以防止出现此类问题.

Even though this is not a Nuget bug and rather a problem caused by inexperience, I logged an issue with Nuget to see if they can improve the software to prevent these types of problems.

更多推荐

NuGet 不更新项目引用

本文发布于:2023-11-07 14:45:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1566734.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:项目   NuGet

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!