如何在同一解决方案中链接多个项目? [英] How to link multiple projects in the same solution?

查看:115
本文介绍了如何在同一解决方案中链接多个项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我能够从另一个项目中调用方法/类,反之亦然.我已经做过先添加引用,然后再添加项目",(A对B的引用),我可以从A中的B访问,但是当我尝试从A ... B中访问时却无法.现在我对B执行另一个添加引用"时,出现有关循环引用的错误提示.我该如何解决?

我基于WPF.

I want that I will be able to call method/classes from another project and/or vice versa. I already did "Add Reference then the project", (A references to B), I can access from B in A, but when I try to access from A...B couldn''t. When I did another "Add Reference" now to B, there is an error prompt about cyclic reference something. How can I fix this?

I am basing on WPF.

推荐答案



不允许使用循环引用,因此您应该考虑更改设计.简而言之,问题是如果它们相互依赖,应该首先构建哪个库?

尝试将类等从另一个库移到另一个库,或者创建第三个库(有点像基本库),在其中收集所有常用服务.
Hi,

Cyclic references aren''t allowed so you should consider changing your design. In short the problem is that which library should be built first if they both depend on each other?

Try moving classes etc from the other library to the other or create a third library, kinda base-lib, where you gather all the common services.


这篇关于如何在同一解决方案中链接多个项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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