Re: Possible solution for some...
The easiest is to use the NuGet package:
https://winscp.net/eng/docs/library_install#nuget
https://winscp.net/eng/docs/library_install#nuget
bin\output
folder and run the DLL from that location. Therefore, the WinSCP.exe
file would also need to be in the bin\output
folder as well.
WinSCP.exe
file to the bin\output
or set "Copy Local" to false for the WinSCPnet.dll
reference, in which case it will always look in the referenced location for both files.
WinSCPnet.dll
with matching version of WinSCP.exe
.
01/24/2022 15:00:01 Error: The version of C:\Program Files (x86)\WinSCP\winscp.exe (5.19.5.0) does not match version of this assembly C:\Windows\system32\WinSCPnet.dll (5.9.6.0).
Session.DebugLogPath
).
Error Message: Cannot use \bin\winscp.exe
Stack Trace: at WinSCP.ExeSessionProcess.CheckVersion(String exePath, FileVersionInfo assemblyVersion)
at WinSCP.ExeSessionProcess..ctor(Session session, Boolean useXmlLog, String additionalArguments)
at WinSCP.Session.Open(SessionOptions sessionOptions)
debug-mmg_03032021.log
.
debug-mft_03032021.log
Session.DebugLogPath
. Submit the log with your post as an attachment. If you do not want to post the log publicly, you can mark the attachment as private.'The version of C: \ Program Files (x86) \ WinSCP \ winscp.exe does not match version of this assembly C: \ Program Files (x86) \ WinSCP \ WinSCPnet.dll (5.17.10.0). '
WinSCP.exe
and WinSCPnet.DLL
are from version 5.17.10
Session.DebugLogPath
).
The version of C:\Program Files (x86)\WinSCP\5.17.3.0\WinSCP.exe () does not match version of this assembly F:\MyTask\WinSCPnet.DLL (5.17.3.0).
WinSCP.ExeSessionProcess.CheckVersion(String exePath, FileVersionInfo assemblyVersion):260
WinSCP.ExeSessionProcess..ctor(Session session, Boolean useXmlLog, String additionalArguments):151
WinSCP.Session.Open(SessionOptions sessionOptions):944
MyTask.Core.FtpClient.get_Session():188