C#打包时第三方库放到一个子目录中

步骤1:添加引用,浏览到需要的dll目录中,选择dll添加

双击app.config文件,

在configuration节点中添加

<runtime>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<probing privatePath="pal" />

</assemblyBinding>

</runtime>

 

如果有多个子文件夹,两个地址用“;”隔开,如<probing privatePath="lib;bin;config/user"/>

在exe目录中建立pal文件夹,将需要的dll复制到这里。

相关文章:

  • 2021-11-09
  • 2022-12-23
  • 2021-05-18
  • 2021-05-15
  • 2021-06-14
  • 2021-04-02
  • 2021-07-07
  • 2022-12-23
猜你喜欢
  • 2021-07-28
  • 2021-12-10
  • 2022-12-23
  • 2022-01-07
  • 2021-09-25
  • 2021-06-18
相关资源
相似解决方案