这都是假设,所以请耐心等待。
假设我正在用 C# 编写一个名为 Foo 的工具。 输出是 foo.exe。 我发现了一些我喜欢使用的非常棒的库,称为 Bar,我可以在我的项目中将其引用为 bar.dll。 当我构建项目时,输出目录中有 foo.exe 和 bar.dll。 目前很好。
我想做的是链接 foo.exe 和 bar.dll,这样它们就是一个程序集 foo.exe。 我希望能够在 VS2008 中执行此操作,但如果我必须求助于像 al.exe 这样的命令行工具,我不太介意。
This is all hypothetical, so please bear with me.
Say I'm writing a tool in C# called Foo. The output is foo.exe. I've found some really great library that I like to use called Bar, which I can reference as bar.dll in my project. When I build my project, I have foo.exe and bar.dll in my output directory. Good so far.
What I'd like to do is link foo.exe and bar.dll so they are one assembly, foo.exe. I would prefer to be able to do this in VS2008, but if I have to resort to a command-line tool like al.exe I don't mind so much.
发布评论
评论(4)
感谢所有回答的人!
我最终得到了 NuGenUnify ,它为 ilmerge 提供了 GUI 包装器。
Thanks everyone who answered!
I ended up with NuGenUnify which provides a GUI wrapper for ilmerge.
有ILMerge。 链接
There's ILMerge. Link
在项目属性下设置构建后事件:
ilmerge /out:$(TargetDir)foo.exe $(TargetPath) $(TargetDir)bar.dll
Set up a post-build event under Project Properties:
ilmerge /out:$(TargetDir)foo.exe $(TargetPath) $(TargetDir)bar.dll
查看此处找到的 ILMerge 工具。
Check out the ILMerge tool found here.