查找解决方案中所有项目的所有参考 [英] Find all reference on all projects in solution

查看:33
本文介绍了查找解决方案中所有项目的所有参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的解决方案包含多个项目(比如 P1、P2).在项目依赖中,我设置了P2依赖P1,所以P2使用了P1中的一些类.当我对 P1 的类/方法执行查找所有引用时,结果仅显示 P1 中的出现;不是 P2 中使用的出现次数.有没有办法让 Find All References 在整个解决方案上工作?

My solution contains multiple projects (say P1, P2). In project dependencies, I set P2 to depend on P1, so P2 uses some classes in P1. When I do a Find All References on a class/method of P1, the result shows only the occurences in P1; not the occurences used in P2. Is there a way to have Find All References work on the entire solution?

推荐答案

Project -> Project Dependencies 仅用于描述额外的非链接相关的依赖项.为非托管代码使用指定链接依赖:

Project -> Project Dependencies is only for describing additional non-link related dependencies. To specify a link dependency for unmanaged code use:

Project -> Properties -> Common Properties -> Framework and References -> References -> Add New Reference... -> Projects

Project -> Properties -> Common Properties -> Framework and References -> References -> Add New Reference... -> Projects

和托管代码使用:

项目 -> 添加引用 -> 项目

Project -> Add Reference -> Projects

如果设置正确,Visual Studio 应该能够找到项目间引用.

If this is set up correctly Visual Studio should be able to find inter-project references.

这篇关于查找解决方案中所有项目的所有参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆