合并两个Windows应用程序源代码. [英] Merge two windows application source code.

查看:97
本文介绍了合并两个Windows应用程序源代码.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows应用程序上工作,我有两个项目源,我想全部合并,因此,如果我使用添加存在文件进行合并,那么它将给我错误,因此有关此的任何解决方案?

I am working on windows application i have two source of my project i want to merge that all so if i do so using add ecisting files then it giving me errors so any solution regarding this ?

推荐答案

复制和粘贴.您尝试过吗?
Copy and Paste. Did you try that?


在合并它们之前,请考虑另一种可能性:将它们保留为单独的程序集.由另一个程序集引用一个程序集(将引用的程序集用作库),或者由第三个程序集,应用程序或另一个库同时引用.这很容易,不会影响您的工作,不会带来任何其他麻烦.程序集之间的边界对于Visual Studio,调试器或任何其他工具非常透明.

如果要合并代码,则可以执行.如果名称冲突,请在合并前在一侧重命名.首先,删除一个入口点(通常这是一个静态的Main方法)—显然,您不能在一个应用程序中包含两个入口.
—SA
Before merging them, think about another possibility: to leave them as separate assemblies. Reference one assembly by another (use the referenced assembly as a library) or reference both by a third assembly, an application or another library. This is easy and won''t effect your work, won''t introduce any additional hassles. The boundaries between assemblies are very transparent for Visual Studio, Debugger or any other tools.

If you want to merge the code, you can do it. If you have conflicting name(s), rename it (them) on one side before merging. First of all, remove onе of the entry points (usually this is a static Main method) — apparently, you cannot have two in one application.

—SA


这篇关于合并两个Windows应用程序源代码.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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