Visual Studio (2008) - 哪些项目引用特定程序集?

发布于 2024-09-04 01:11:00 字数 481 浏览 3 评论 0原文

我有一个包含大量项目(例如 30 个)的解决方案,我想找到其中哪些项目引用了特定的程序集。

这是一个具体示例:在对象浏览器中,我可以看到整个解决方案引用了同一程序集的两个不同版本。我想查看哪些项目使用了这些引用中的每一个,因此我可以将它们全部更新为指向同一事物。

替代文本 http://www.freeimagehosting.net/uploads/bd7c85cb2e.png

不幸的是,.csproj 文件分散在不同的位置,因此简单的 grep 并不是那么简单。

有什么建议吗?

我正在考虑制作一个脚本来解析 .sln 文件,然后解析每个项目文件,但也许有一个更简单的解决方案。

附言。我正在使用 ReSharper,如果有帮助的话。

I have a solution with a decent number of projects (say, 30) and I want to find which of these projects reference a particular assembly.

Here's a concrete example: In the Object Browser I can see that two different versions of the same assembly are referenced throughout the solution. I want to see which project(s) use each of these references, so I can update them all to point to the same thing.

alt text http://www.freeimagehosting.net/uploads/bd7c85cb2e.png

Unfortunately, the .csproj files are scattered in different locations, so a simple grep is not all that simple.

Any suggestions?

I'm thinking of making a script that parses the .sln file and then parse each project file, but maybe there's a simpler solution.

PS. I'm using ReSharper, if that's any help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情痴 2024-09-11 01:11:00

在Resharper 5.0中,您可以单击一个项目并使用“查找模块依赖的代码”。那应该会给你你想要的。

In Resharper 5.0, you can click on a project and use "Find Code Dependent on Module". That should give you what you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文