c#引用本地dll发布后运行exe错误

在config 文件夹 configuration 配置节点下面 添加

<runtime>  

<gcConcurrent enabled="true" />  

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

<publisherPolicy apply="yes" /> 

<!--dll的文件夹多个用逗号隔开 如 privatePath ="DLL,RESOURS/DLL"-->  

<probing privatePath="dll" />  

</assemblyBinding>  

  </runtime>  

原文地址:https://www.cnblogs.com/songconglai/p/6100503.html