User WinSCPnet.dll under Debian Buster

Advertisement

Aimless
Guest

User WinSCPnet.dll under Debian Buster

Hi there,
so a while ago I wrote a script that connects to a SFTP- reads all Files from a directory
and then logs these to a database.
Now the server this is deployed to needed to be changed to a server running debian buster.
My code uses the WinSCPnet.dll in order to connect as well as read the files (and that always worked flawlessly under windows 10) however since i ported it to the new server, i keep on getting errors.
I included the .dll / exe via NuGet into my project and the WinSCP.exe as well as the WinSCPnet.dll are both inside the output folder.
Depending on how I create the session I get one of three errors:
1) Session session = new Session() //No executable Path, just fingerprint, ip, user, password
Error: The winscp.exe executable was not found at location of the assembly WinSCPnet (/home/user/programName),
nor the entry assembly {myDotNetAssembly} (/home/user/programName),
nor in an installation path.
You may use Session.ExecutablePath property to explicitly set path to winscp.exe.
2) Session session = new Session() { ExecutablePath = {Linux Path to executable}}
Error: The version of /home/user/ProgramName/WinSCP.exe () does not match version of this assembly /home/user/programName/WinSCPnet.dll (5.17.9.0).
When checking manually, they do have the version 5.17.9.0 though.
3) Open Session(sessionOptions) { ExecutablePath = ..., DisableVersionCheck = true }
Error: The named version of this synchronization primitive is not supported on this platform.

Please note that I changed the paths in the above code for privacy reasons, but rest assured they are correct in my release build.
Is this something I can fix somehow or do I need to rewrite my code to not use WinScpNet.dll anymore?

Thanks for any help in advance.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum