vs2010中的项目参考 [英] project reference in vs2010

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

问题描述





i希望使用c#



i want to add project reference for project-1 and project-2 vice versa for windows form application using c#

推荐答案

在P1中创建对P2的引用,在P2中创建对P1的引用可能不是一个好主意。如前所述,这会产生循环引用,这些引用无济于事。



一个更好的想法是创建一个持有常见的第三个(DLL)项目元素和您的两个项目都参考。这样,项目的相互依赖性就会降低,这只能从设计的角度来看更好,而且从可靠性/可维护性的角度来看也是如此。
Creating a reference to P2 in P1 and to P1 in P2 is probably not a good idea. As has been said, this creates circular references which are not helpful.

A much, much better idea is to create a third (DLL) project which holds the "common" elements and which both of your projects reference. That way, the interdependence of the projects is reduce, which can only be better from a design standpoint, and a reliability / maintainability point of view as well.


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

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