由网友(念你成疾)分享简介:我想提出用我的应用程序,以一个子目录中的所有库(DLL)(让我们说叫lib目录)。如何指示组件加载器来查找引用的程序集在特定的目录(这是一个目录,其中主组件存在的子目录)?I want to put all libraries (dll) used by my application to a subdirector...
我想提出用我的应用程序,以一个子目录中的所有库(DLL)(让我们说叫lib目录)。如何指示组件加载器来查找引用的程序集在特定的目录(这是一个目录,其中主组件存在的子目录)?
I want to put all libraries (dll) used by my application to a subdirectory (let' say named "lib"). How to instruct assembly loader to look for referenced assemblies in that particular directory (which is a subdirectory of a directory, where main assembly exists)?
我认为它应该在的app.config某些设置来完成,对吧?
I assume it should be done by some settings in app.config, right?
推荐答案
探测的路径在你的app.config。借用这个例子从MSDN:
probing paths in your app.config. To borrow the example from MSDN:
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin2subbin;bin3"/>
</assemblyBinding>
</runtime>
</configuration>
相关推荐
最新文章