Windows窗体应用程序,Addreference所有时间 [英] Windows form application, Addreference all times

查看:95
本文介绍了Windows窗体应用程序,Addreference所有时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个大型的Windows窗体应用程序。它包含20多个类库。每当我对任何一个库函数进行更改时,我都应该清理并重建所引用的所有其他类库。有时我需要删除引用并且应该是Browse->加。它破坏了我整个开发时间。有没有其他方法可以解决它。

我的项目结构:



解决方案'样品'(20个项目)

Folder_A

AA.dll

BB.dll

XX.dll

Folder_B

AA.dll

BB.dll

XX.dll

Folder_X

AA.dll

BB.dll

XX.dll

将.dll视为类库项目。每一个都指的是其他的。在这种情况下,如果我做了任何更改ex(Folder_A - AA.dll)然后我应该删除AA.dll引用表单其他项目并再次添加它。有时我会感到困惑。有没有简单的方法可以自动完成。

解决方案

不,你不需要清除和重建所有。除非您明确命令完全重建,而不是构建,否则构建是增量的,基于时间戳和源中实际更改的检测。此外,C#编译和构建速度如此之快,以至于很难相信它真的破坏了整个开发时间。



无论如何,你可以随时改进它将解决方案分解为一些单独的程序集请记住,如果您之前的决定不够方便,那么在以后的任何时候都可以轻松完成并改变程序集之间的界限。最好将所有项目保存在一个解决方案中,并按项目添加引用,这些项目更稳定,并且可以容忍项目中的更多更改(名称,位置,签名)。特别是,它消除了删除引用并再次添加引用的需要。只需使用 public 访问修饰符即可在另一个程序集中使用的类型和成员。我只建议不要完全特别做,但尝试在解决方案中规划不同的图层。



-SA

Hi, I am developing a large windows form application. It contains more than 20 Class library. Whenever I made changes on any one of the library function, then I supposed to clean and rebuild all other class library's which refers. Some times I need to delete the reference and supposed to Browse-> Add. It spoils my entire development time. Is there any alternative way to solve it.
My Project Structure:

Solution 'Sample'(20 projects)
Folder_A
AA.dll
BB.dll
XX.dll
Folder_B
AA.dll
BB.dll
XX.dll
Folder_X
AA.dll
BB.dll
XX.dll
Consider .dll as class library project. Each and every one refers other. In this case, if I made any changes ex(Folder_A - AA.dll) then I supposed to delete AA.dll reference form other project and add it again. Some times I am getting confused. Is there any easy way to make it automatically.

解决方案

No, you don't need to clear and rebuild all. The build is incremental, based on time stamps and detection of real change in the sources, unless you explicitly command the full rebuild, instead of build. Besides, C# compilation and build is so fast that it's hard to believe that it really "spoils your entire development time".

Anyway, you can improve it any time by breaking your solution into some separate assemblies. Remember that it's quite easy to do at any later time and change the boundaries between assemblies if your previous decision was not convenient enough. It's the best to keep all projects in one solution and add references by projects, which are more stable and will tolerate more changes in your projects (name, location, signatures). In particular, it eliminates the need for removing a reference and adding it again. All it takes is using public access modifiers for the types and members to be used in another assembly. I would only recommend not doing it completely ad-hoc, but try to plan distinct layers in your solution.

—SA


这篇关于Windows窗体应用程序,Addreference所有时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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