OK, can you post a complete session log file both from code and GUI?
- martin
So with that package it works a step further. The exception about the versions are history.
But now, he's getting a Disconnect-Exception every Time I use DuplicateFile().
WinSCP.SessionOptions SessOpts = new WinSCP.SessionOptions {
Protocol = WinSCP.Protocol.Ftp,
HostName = "***",
UserName = "***",
Password = "***"
};
using ( WinSCP.Session Sess = new WinSCP.Session() ) {
Sess.Open( SessOpts );
WinSCP.TransferOptions TransOpts = new WinSCP.TransferOptions();
TransOpts.TransferMode = WinSCP.TransferMode.Binary;
WinSCP.TransferOperationResult TransOprtResult;
TransOprtResult = Sess.PutFiles( sGeneratedFilePath, RemoteFileName, false, TransOpts );
TransOprtResult.Check();
Sess.DuplicateFile(
RemoteFileName,
RemoteFileName.Replace(".csv", string.Format("_{0}-{1}.csv", DateTime.Now.ToString("yyyyMMdd") , DateTime.Now.ToString("HHmmss")) )
);
}
WinSCP.SessionRemoteException: Lost connection.
Disconnected from server
Error copying file '/import/alle-wz-shopkunden.csv' to '/import/alle-wz-shopkunden_20181004-094901.csv'.
Is that the answer about why the current download produces a version conflict?Why don't you use NuGet package?
WinSCP.SessionLocalException: The version of U:\...\bin\Debug\winscp.exe (5.13.4.0) does not match version of this assembly U:\...\bin\Debug\WinSCPnet.DLL (5.13.1.0).