如何在bash中使用mcs(mono)命令消除依赖关系? [英] how to eliminate dependencies with mcs (mono) command in bash?

查看:254
本文介绍了如何在bash中使用mcs(mono)命令消除依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在bash中对mono使用以下命令(以编译C#程序)

I use the following command for mono in bash (to compile a C# program)

mcs -t:library -r:nunit.framework.dll *.cs

它可以工作,并且我有我的Program.dll.但是,当我尝试使用dll(例如,使用NUnit)时,如果我在同一文件夹中没有nunit.framework.dll,它将无法正常工作. Program.dll是否有可能包含在其中" nunit.framework.dll,所以我只有一个文件可以移动?

it works and I have my Program.dll. However, when I try to use the dll (with NUnit for example) if I don't have the nunit.framework.dll in the same folder, it doesn't work. Is it possible for the Program.dll to "have in it" the nunit.framework.dll so I only have one file to move around?

我如何告诉msc命令执行此操作?

How do I tell the msc command to do this?

推荐答案

使用mcs不可能,但是您可以使用

This is not possible using mcs but you can use ILRepack.exe to merge the assemblies into one file.

ILRepack.exe [options] /out:<path> <path_to_primary> [<other_assemblies> ...]

这篇关于如何在bash中使用mcs(mono)命令消除依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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