[英]How to merge several Visual Studio projects in 1 Launcher project
So i made 6 different little applications each in its own Project. 因此,我在自己的项目中分别做了6个不同的小应用程序。
And my idea is now to build some kind of Launcher with 6 buttons each of them launching their respectives applications. 我现在的想法是用6个按钮构建某种启动器,每个按钮启动各自的应用程序。
I know how to /Add/Existing Projects/Select Project, but my worry is more upon managing to run those application on a Button_Click. 我知道如何/添加/现有项目/选择项目,但是我更担心的是设法在Button_Click上运行那些应用程序。
I'm thinking about copy/paste-ing my .cs files of each apps, and their resources. 我正在考虑复制/粘贴每个应用程序的.cs文件及其资源。
Should I ? 我是不是该 ? Shouldn't I ? 不是吗 What would be the best thing to do ? 最好的办法是什么?
EDIT1 编辑1
Well, as i said, my apps are very small, i mean like very very small. 嗯,正如我所说,我的应用程序非常小,我的意思是非常小。 It's mostly about automating templates mails sendings and opening/closing reports. 这主要是关于自动化模板邮件发送和打开/关闭报告。
All my apps are in a single form each and they only refer to .png or .txt to store datas or dress up fancy-ish reports with images. 我所有的应用程序都以单一形式存在,并且它们仅引用.png或.txt来存储数据或用图像装饰精美的报告。
Right now, I'm in the process of importing FormX.cs one by one, as NonStatic said, re-referencing the UI and renaming some functions. 现在,正如NonStatic所说,我正在一个接一个地导入FormX.cs,正在重新引用UI并重命名一些功能。 I did 2 so far, and i'm hitting a generic file path issue. 到目前为止,我做了2个,但遇到了通用文件路径问题。
I'm not sure how ressources are working once the .exe is built. 我不确定.exe生成后资源如何工作。 Are they "embed" whereever the ressources file is located ? 它们是否在资源文件所在的位置“嵌入”了? (Resources folder, or ..\\bin\\debug) or should i be carefull with this and systematicly put tehm in some specific folder ? (资源文件夹,或.. \\ bin \\ debug),还是我应该谨慎处理,并将tehm系统地放在某些特定的文件夹中?
Also, thanks for your point Zdravko Danev, i was about to just copy/paste everything. 另外,感谢您的发言,Zdravko Danev,我将要复制/粘贴所有内容。 You made me think slower about this. 你让我觉得慢一点。 But i'm kind of searching for a real merged solution, "fusioned solution" if i may say. 但我有点在寻找一个真正的合并解决方案,如果我可以说的话,就是“融合解决方案”。 I don't want buttons to just run .EXEs. 我不希望按钮仅运行.EXE。 :p :p
EDIT2 编辑2
I managed to copy/paste all my forms, was kinda easy, though time consumming to check every references. 我设法复制/粘贴了我所有的表格,这很简单,尽管花费了很多时间检查每个引用。 But it's done. 但这已经完成了。
Most definitely do not copy the code! 绝对不要复制代码!
It is relatively easy to create a simple launcher. 创建一个简单的启动器相对容易。 Take a look at Process.Start: 看一下Process.Start:
https://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx https://msdn.microsoft.com/zh-CN/library/system.diagnostics.process.start.aspx
I think your question is not about merge projects but how to launch them in a uniformed application or launcher. 我认为您的问题不是关于合并项目,而是如何在统一的应用程序或启动器中启动它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.