自定义dll文件位置 [英] customizing dll file location

查看:137
本文介绍了自定义dll文件位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在创建一些dll文件.有什么办法,以便在客户端使用该dll安装应用程序时,使dll位于不同的目录中,并且可以从该目录中引用dll.方案

高朗,

您可以随时选择动态加载库
通过Assembly myAssebmly = Assembly.LoadFile("path to assembly file here");

这里是CP上的链接: http://www.codeproject.com/KB/cs/DynLoadClassInvokeMethod.aspx

其中包含一些有用的信息.

干杯

Manfred


好吧,只要将DLL放在GAC(全局程序集缓存-与您的应用程序不同的文件夹)中,就可以引用它们.

所有,您需要给D ::赋予一个强大的名字,以便可以将它们放置在GAC中.


Hey guys,

I am creating some dll files.Is there any way so that while installing my application using that dll in clients end so that dll are located in a different directory and dll can be referenced from that directory.

解决方案

Hi Golam,

you can always choose to load a library dynamically
via Assembly myAssebmly = Assembly.LoadFile("path to assembly file here");

Here a link on CP: http://www.codeproject.com/KB/cs/DynLoadClassInvokeMethod.aspx

that has some useful information.

Cheers

Manfred


Well, as long as the DLL''s are placed in GAC (Global Assembly Cache - a different folder than you application one), they can be referenced.

All, you need is to give strong name to your D:: such that they can be placed in GAC.


这篇关于自定义dll文件位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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