App.Config不适用于子目录

时间:2014-12-16 23:35:28

标签: c# winforms

我有以下配置文件和2个程序集位置,我希望我的应用程序可以查看..但它似乎不适用于子目录lib/awesomium

<?xml version="1.0" encoding="utf-8"?>

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <probing privatePath="lib" />
      <probing privatePath="lib/awesomium" />
    </assemblyBinding>
  </runtime>
</configuration>

1 个答案:

答案 0 :(得分:2)

看来你的路径即。 /不正确

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <probing privatePath="lib;lib\awesomium;" />
    </assemblyBinding>
  </runtime>
</configuration>

取自此示例MSDN: Probing Element

<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <probing privatePath="bin;bin2\subbin;bin3"/>
      </assemblyBinding>
   </runtime>
</configuration>