简体   繁体   English

在项目中查找程序集依赖项

[英]Finding assembly dependencies in a project

I have a solution where one of the references is refering to google.protobuff v3.1.0.0, but when building the solution I get the older version google.protobuff v3.0.0.0. 我有一个解决方案,其中的引用之一是指google.protobuff v3.1.0.0,但是在构建解决方案时,我得到了较旧的版本google.protobuff v3.0.0.0。

From what I gather one of the other references in the project is refering to v3.0.0.0 and overriding v3.1.0.0, but how can I find who's referring to it? 根据我的收集,项目中的其他参考之一是参考v3.0.0.0并覆盖了v3.1.0.0,但是我怎么能找到谁在参考呢? there are tons of references in the project. 该项目中有大量参考资料。

I tried using Analyze Assembly Dependencies, but it shows that google.protobuff.dll is dangling (means no one depends on it). 我尝试使用“分析程序集依赖关系”,但它表明google.protobuff.dll悬空(意味着没有人依赖它)。

Thank you, Ofir 谢谢你,Ofir

You can check which project uses a particular assembly and which version, using the Solution Explorer. 您可以使用解决方案资源管理器检查哪个项目使用特定的程序集以及哪个版本。

Example - searching for the Newtonsoft.Json assembly: 示例-搜索Newtonsoft.Json程序集:

解决方案资源管理器搜索

Also, if your assembly is coming from a Nuget package, right-click your solution and select " Manage NuGet Packages for Solution " and then " Consolidate " to check if there are different versions of the package/assembly in the solution: 另外,如果您的程序集来自Nuget程序包,请右键单击您的解决方案,然后选择“ 管理解决方案的NuGet程序包 ”,然后选择“ 合并 ”以检查解决方案中程序包/程序集是否有不同版本:

Nuget巩固

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

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