Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/314.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
c#与wpf应用程序的程序集绑定_C#_.net_Wpf_Visual Studio_.net Assembly - Fatal编程技术网

c#与wpf应用程序的程序集绑定

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

我想用我的应用程序绑定一个来自其他文件夹的dll文件

例如:

文件结构:

-重要的.dll

-文件夹

  • 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>