Could not load file or assembly log4net, Version=1.2.13.0

System.IO.FileLoadException: Could not load file or assembly 'log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a'
   
   at dcs.packing.BoxCodeSocketServer.StartBoxReaderServer(Int32 port)
   at dcs.packing.BoxCodeSocketServer.Start()
   at dcs.packing.FrmMain.Client_Connected(Object sender, EventArgs e)
   at dcs.net.TcpClientManager.Client_DataReceived(Object sender, DataEventArgs e)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

如题报错:本机运行一直OK,发布到其他机器报错,解决办法:

在配置文件中写入如下配置项:


   
     
       
       
     

     
       
       
     

   

 
 

你可能感兴趣的:(C#.NET)