Visual Studio 操作
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复制到这里。
WPF 使用ImageBrush 相对位置使用图片资源,运行时报错
<ImageBrush ImageSource="/Resources/Login1.png"/>
右键图片,点击属性,生成操作,选择Resource。

浙公网安备 33010602011771号