【发布时间】:2014-07-17 06:02:43
【问题描述】:
我在我的 C# 项目中使用了一个 dll,它的目录与 exe 文件的位置完全相同。所以当我安装我的项目时,dll文件将位于exe目录中。
有什么办法可以改变 dll 目录吗?例如 dll 文件位于:bin\DLLs。我不想让那个用户轻易知道我的 dll。
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin\DLLs" />
</assemblyBinding>
</runtime>
谢谢。
【问题讨论】:
-
您可以在配置文件中更改并包含路径。
-
[stackoverflow: 设置自定义 dll 路径][1] [1]: stackoverflow.com/questions/1892492/…
-
@user3840692 我测试了该解决方案,但没有奏效。你知道为什么吗?我编辑我的问题。