probing privatePath and subdirectories

喜欢而已 提交于 2019-12-07 04:01:05

问题


In my application I would like to put DLL files in a subdirectory. I'm using the probing element in app.config and it works quite fine, but I've got an issue with localization assemblies.

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <probing privatePath="libs"/>
</assemblyBinding>

If I have two DLLs in:

libs/de/myAssembly.dll

and

libs/myAssembly.dll

The first one is loaded, while I want that the file in the root folder is preferred. How can I achieve this?


回答1:


You can set multiple paths to probe.

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <probing privatePath="libs;libs/de;libs/fr"/>
</assemblyBinding>

Please see official microsoft documentation on probing element



来源:https://stackoverflow.com/questions/21931312/probing-privatepath-and-subdirectories

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!