VB.NET-项目-循环依赖 [英] VB.NET - Project - Circular Dependency

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

问题描述

嗨.

在VB.Net中,我从WAM_TaskSelector调用WAM_Utils中的Form2.并能100%工作.现在,我想在原始项目(WAM_TaskSelector)中打开一个Form1,并且想添加引用的那一刻,它告诉我存在循环依赖", 有办法解决吗?

In VB.Net, I call a Form2 in WAM_Utils from WAM_TaskSelector. and that works 100%. Now I want to open a Form1 in the original project (WAM_TaskSelector) and the moment that I want to add a reference, it tell me there is a "Circular Dependency", is there a way around this?

https://social.msdn.microsoft.com/Forums/getfile/962366

https://social.msdn.microsoft.com/Forums/getfile/962366

致谢

Kobus

推荐答案

在VB.Net中,我从WAM_TaskSelector调用WAM_Utils中的Form2.并能100%工作.现在,我想在原始项目(WAM_TaskSelector)中打开一个Form1,并且想添加引用的那一刻,它告诉我存在循环依赖", 有办法解决吗?

In VB.Net, I call a Form2 in WAM_Utils from WAM_TaskSelector. and that works 100%. Now I want to open a Form1 in the original project (WAM_TaskSelector) and the moment that I want to add a reference, it tell me there is a "Circular Dependency", is there a way around this?

如果要打开Form1,为什么要添加引用?如果是因为表单在另一个项目中,则解决方案是将表单移到第三个项目中,并将该第三个项目作为两个现有项目的参考.

If you want to open a Form1, why are you adding a reference?  If it's because the form is in another project, then the solution is to move the form into a third project, and include that third project as a reference from both the existing projects.


这篇关于VB.NET-项目-循环依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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