是否有可能编译控制台应用程序到单个.dll文件?有可能、控制台、应用程序、文件

由网友(幼儿园老大)分享简介:有工作过对方的输出5控制台应用程序,并分别安装在我的电脑上(C#4.0,我的作者)。管理部门希望分发此套件的应用程序给其他用户,而不是激动不已,询问非技术用户安装/配置5个独立的应用程序。有没有什么办法可以降低编译每个程序转换成一个.dll文件,并通过一个单一的主应用程序中引用它们?There are 5 conso...

有工作过对方的输出5控制台应用程序,并分别安装在我的电脑上(C#4.0,我的作者)。管理部门希望分发此套件的应用程序给其他用户,而不是激动不已,询问非技术用户安装/配置5个独立的应用程序。有没有什么办法可以降低编译每个程序转换成一个.dll文件,并通过一个单一的主应用程序中引用它们?

There are 5 console apps working off each other's outputs and are separately installed on my computer (C# 4.0, I am the author) . Management would like to distribute this suite of apps to other users, but aren't thrilled about asking non-tech users to install/configure 5 separate applications. Is there any way I can compile each program down into a .dll and reference them through a single master application?

推荐答案

问:的主要问题似乎是你不想要5个独立的安装步骤?

Q. The main issue seems to be that you don't want 5 separate installation steps?

一个。制作一个安装程序套件:)使用任何MSI建设者(维克斯,Visual Studio安装程序项目时,InstallShield,的和其他许多人的;哎呀,你甚至可以做一个XCOPY部署在大多数情况下)

A. Make an installer for the suite :) Use any MSI builder (WiX, Visual Studio setup projects, InstallShield, and many others; Heck, you could even do an XCOPY deployment in most cases)

问:如何直接调用这些程序中的单个进程?

Q. How do I directly invoke these programs from within a single process?

A 选项:

在加载程序集的应用程序域。 使用一个单独的AppDomain中的情况下,名(空间)冲突或版本冲突

问:如何可选择隐藏在外部控制台应用程序从视图中的presence

Q. How do I optionally 'hide' the presence of the external console apps from view

一个。看的的 ilmerge 以可能结合外部组件,使他们不再可见。如果你不能使用ilmerge(冲突,或如WPF应用程序)你可以把它们嵌入的资源,并加载它们的需求按1和2。上述

A. Look at ilmerge to possibly combine the 'external' assemblies so they aren't visible anymore. If you can't use ilmerge (conflicts, or e.g. WPF apps) you might embed them as resources and load them on demand as per 1. and 2. above

更新:的https://libz.$c$cplex.com/ 是一个很好看的项目,使这个容易(还没有尝试过我自己)

Update: https://libz.codeplex.com/ is a nice looking project that makes this easy (haven't tried it myself)

阅读全文

相关推荐

最新文章