Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Error

You have different versions of WinSCP.exe, WinSCP.com (the problem 2) and WinSCPnet.dll (the problem 3)

In VS, the easiest to is to use NuGet package:
https://winscp.net/eng/docs/library_install#nuget

You definitely should not rely on the installed version (in Program Files) of the WinSCP.exe. Your application should include/deploy its own copy.
Henry Lo

Error

Hello Martin
computer OS version --> Windows 7 Service Pack 1
Henry Lo
Henry Lo

Error

Hello Martin
1. WinSCP.exe (Version 5.19.2(Build 11614)) --> OK
File protocol: SFTP
Host name: 192.168.185.251
Port number: 22
User name: manufact
Password: SUNRISE
First connect display --> "ssh-rsa 2048 d7:db:c5:44:8e:f6:55:87:bd:c9:1e:e8:53:71:e1:45"
2. In DOS mode state run winscp.com (Version ?) -->
Incompatible external console protocol version 1

3. Microsoft Visual Studio Community 2017 Ver.15.9.9
Dim sessionOptions As New SessionOptions
Dim session1 As New Session
With sessionOptions
     .Protocol = Protocol.Sftp
     .HostName = "192.168.185.251"
     .UserName = "manufact"
     .Password = "SUNRISE"
     .PortNumber = 22
     .FtpMode = FtpMode.Active
     .FtpSecure = FtpSecure.None
     .SshHostKeyFingerprint = "ssh-rsa 2048 d7:db:c5:44:8e:f6:55:87:bd:c9:1e:e8:53:71:e1:45"
     .GiveUpSecurityAndAcceptAnySshHostKey = True
End With
session1.DisableVersionCheck = false
session1.Open(sessionOptions)

Error in here
WinSCP.SessionLocalException:The version of c:\Program Files(x86)\WinSCP\winscp.exe(5.19.2.0) does not match version of this assembly c:\User\AppData\Local\Temporary Projects\WindowsApp1\bin\Debug\WinSCPnet.Dll(5.17.1.0)

session1.DisableVersionCheck = True
session1.Open(sessionOptions)

Error in here:
WinSCP.SessionLocalException:不相容的外部主控台協定版本9

Can you pls. helo what Could wrong?
Thanks
Henry Lo