如何将引用打包到DLL中? [英] How to package references into DLL?

查看:111
本文介绍了如何将引用打包到DLL中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我创建一个引用其他DLL的DLL(my.dll),我该怎么做

确定其他开发人员只需要my.dll而不是所有其他的DLL

引用?有没有办法将引用编译成my.dll和

只发布一个DLL?


谢谢,

Brett

解决方案

Brett Romero< ac ***** @ cygen.com>写道:

如果我创建一个引用其他DLL的DLL(my.dll),我该怎么做呢?确保其他开发人员只需要my.dll而不是所有其他的DLL <参考?有没有办法将引用编译成my.dll并且
只发布一个DLL?




嗯,有ILMerge,但是''有点黑客 - 这不是什么东西

是有用的。


你*应*分发单独的DLL。这样,如果某个特定DLL有一个补丁

,那么该补丁可以在不影响任何东西的情况下应用。它还可以清楚地显示来自哪里。


你有什么特别的理由不想单独发送其他的

DLL吗?


- -

Jon Skeet - < sk *** @ pobox.com>
http://www.pobox.com/~skeet 博客: http://www.msmvps.com/jon.skeet

如果回复该群组,请不要给我发邮件


否。我只是不知道在这种情况下缺少参考文件。


如果经销商没有提供问题,收件人会遇到问题

提供一切吗?如果DLL丢失,有没有办法让收件人提前知道

时间?意思是,在他们花时间编译

并收到错误之前。


谢谢,

Brett


Brett Romero< ac ***** @ cygen.com>写道:

不,我只是不知道在这种情况下缺少参考文献。

如果经销商没有,收件人会遇到问题
提供一切?如果DLL丢失,有没有办法让收件人提前知道?意思是,在他们花时间编译
并获得错误之前。




好​​吧,你可以很容易地编写一个依赖性行走应用来制作

确保一切都在那里 - 但是手册这些是你需要的文件b $ b文件列表可能是一个更直接的解决方案:)


-

Jon Skeet - < sk *** @ pobox.com>
http://www.pobox.com/~skeet 博客: http://www.msmvps.com/jon.skeet

如果回复小组,请不要给我发邮件


If I create a DLL (my.dll) that references other DLLs, how do I make
sure other developers only need my.dll and not all of the other DLLs it
references? Is there a way to compile the references into my.dll and
just distribute one DLL?

Thanks,
Brett

解决方案

Brett Romero <ac*****@cygen.com> wrote:

If I create a DLL (my.dll) that references other DLLs, how do I make
sure other developers only need my.dll and not all of the other DLLs it
references? Is there a way to compile the references into my.dll and
just distribute one DLL?



Well, there''s ILMerge, but that''s a bit of a hack - it''s not how things
were meant to work.

You *should* distribute the separate DLLs. That way, if there''s a patch
available for a particular DLL, that patch can be applied without
affecting anything etc. It also keeps it clear where things came from.

Do you have any particular reason for not wanting to ship the other
DLLs separately?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


No. I just wasn''t aware of the missing references in this case.

The recipient will have problems then if the distributor does not
provide everything? Is there a way for the recipient to know ahead of
time if DLLs are missing? Meaning, before they spend time compiling
and getting errors.

Thanks,
Brett


Brett Romero <ac*****@cygen.com> wrote:

No. I just wasn''t aware of the missing references in this case.

The recipient will have problems then if the distributor does not
provide everything? Is there a way for the recipient to know ahead of
time if DLLs are missing? Meaning, before they spend time compiling
and getting errors.



Well, you could fairly easily write a dependency walking app to make
sure that everything''s there - but a manual "these are the files you
need" file list is probably a more straightforward solution :)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


这篇关于如何将引用打包到DLL中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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