链接 .Net 程序集

发布于 2024-07-04 08:58:21 字数 281 浏览 5 评论 0原文

这都是假设,所以请耐心等待。

假设我正在用 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

瘫痪情歌 2024-07-11 08:58:21

感谢所有回答的人!

我最终得到了 NuGenUnify ,它为 ilmerge 提供了 GUI 包装器。

Thanks everyone who answered!

I ended up with NuGenUnify which provides a GUI wrapper for ilmerge.

猫卆 2024-07-11 08:58:21

有ILMerge。 链接

There's ILMerge. Link

季末如歌 2024-07-11 08:58:21

在项目属性下设置构建后事件:

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

是伱的 2024-07-11 08:58:21

查看此处找到的 ILMerge 工具。

Check out the ILMerge tool found here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文