I strongly-named all the tree packages (DiffieHellman.dll, Org.Mentalis.Security.dll, Tamir.SharpSSH.dll), and I already invoked the packages to my application which has to be strongly-named.
But there is an exception which I cannot fix. I wrote another demo with no strongly-name packages which works OK, though.
Connect Exception: Tamir.SharpSsh.jsch.JSchException: Session.connect: System.IO.FileLoadException: Could not load file or assembly 'DiffieHellman, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
File name: 'DiffieHellman, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
at Tamir.SharpSsh.jsch.jce.DH.getE()
at Tamir.SharpSsh.jsch.DHG1.init(Session session, Byte[] V_S, Byte[] V_C, Byte[] I_S, Byte[] I_C)
at Tamir.SharpSsh.jsch.Session.receive_kexinit(Buffer buf)
at Tamir.SharpSsh.jsch.Session.connect(Int32 connectTimeout)
I finally fixed this problem. The Tamir.SharpSSH.dll call the DiffieHellman.dll's version is 1.0.0.11, and I call the DiffieHellman.dll's version is 0.0.0.0. This is why I can not load the package. My solution likes this: Download the DiffieHellman's source code to recompiled it to the 1.0.0.11 version and strong named it.
User contributions licensed under CC BY-SA 3.0