我想将更远的文件夹中的dll文件与我的应用程序绑定。
例如:
文件结构:
-重要.dll
-文件夹
- 我的应用程序.exe
我需要这样的东西:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="../" />
</assemblyBinding>
</runtime>
</configuration>
但它不起作用。
我们通过以下方式解决了这个问题:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Important" publicKeyToken="1234567890abcdef"/>
<codeBase version="1.2.3.4" href="../OtherFolder/Important.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>