我可以在 exe 中包含 dll(在 Visual Studio 中)吗?
要运行我的应用程序,我需要位于 Debug 和 Release 文件夹中的 AxInterop.WMPLib.dll
和 Interop.WMPLib.dll
。 有没有一种方法可以将这些 dll 包含到 exe 中,以便我的应用程序仅在一个文件中可用?
Possible Duplicate:
.NET windows application, can it be compressed into a single .exe?
To run my App I need AxInterop.WMPLib.dll
and Interop.WMPLib.dll
that are located in Debug and Release folder. Is there any way to include those dlls into exe so my app is available in one file only?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
只要您的 DLL 是 .NET 程序集,那么 ILMerge 应该能够将您的 exe 及其所有依赖项合并到一个文件中。
As long as your DLLs are .NET assemblies, then ILMerge should be able to combine your exe and all of its dependencies into a single file.
您可以使用 boxedapp 或 thinstall 等工具...
You can use a tool like boxedapp or thinstall...
我还推荐 boxedapp。 这是很棒的应用程序!
I also recommend boxedapp. It's great app!
将它们作为嵌入式包含在内。 然后您可以在运行时提取它们。
Include them as embedded. You can then extract them at run-time.
是的,我省略了写文件的代码...
不需要额外的实用程序。
Yes, I left out the code to write the file out...
No extra utilities required.
例如,将x.dll添加到项目中,并将其Build Action设置为Embedded Resource。
提取:
For example, add x.dll to the project and set its Build Action to Embedded Resource.
To extract: