c#与wpf应用程序的程序集绑定
我想用我的应用程序绑定一个来自其他文件夹的dll文件 例如: 文件结构: -重要的.dll -文件夹c#与wpf应用程序的程序集绑定,c#,.net,wpf,visual-studio,.net-assembly,C#,.net,Wpf,Visual Studio,.net Assembly,我想用我的应用程序绑定一个来自其他文件夹的dll文件 例如: 文件结构: -重要的.dll -文件夹 MyApplication.exe 我需要这样的东西: <?xml version="1.0" encoding="utf-8" ?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <prob
- MyApplication.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>