c# - What could be causing a System.TypeLoadException? -
i'm developing, vs2008 using c#, application honeywell dolphin 6100, mobile computer barcode scanner uses windows ce 5.0 os.
i want add functionality can send files local device distant server. found librairy "tamir.sharpssh " can garantee this. tested code on console application , on normal windows forms application , works perfectly. when tried use same code on wince device, typeloadexception , have error message :
not load type 'tamir.sharpssh.sshtransferprotocolbase' assembly 'tamir.sharpssh, version=1.1.1.13, culture=neutral, publickeytoken=null'.
the code i'm use below :
sshtransferprotocolbase sshcp = new scp(tools.globalvarmeth.hostname, tools.globalvarmeth.serverusername); sshcp.password = tools.globalvarmeth.serveruserpassword; sshcp.connect(); string localfile = tools.globalvarmeth.applicationpath + "/" + filename + ".csv"; string remotefile = tools.globalvarmeth.serverremotefilepath + "/" + filename + ".csv"; sshcp.put(localfile, remotefile); sshcp.close();
any 1 have idea on ? gratefull !!!
it number of things. causes are:
- the assembly cannot found
- an assembly assembly depends upon cannot found
- the assembly found type isn't in it
- the type's static constructor throws exception
your best bet use fusion log viewer diagnose it. documentation here:
http://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.110).aspx
(fyi "fusion" code name of team designed assembly loading system; unfortunate code name ended in file name of shipped product. thing should have been called "assemblybindinglogviewer.exe" or such thing.)
Comments
Post a Comment