Question

Has anyone come up with speed performance using WinSCP .NET?

I try the C# WinSCP example in http://winscp.net/eng/docs/library#csharp. I note that when it starts up, it takes some 30 seconds to reach the first statement (the initialization of WinSCP.SessionOptions).

Anyone knows what is going on? How to speed up?

The thing I have to do is to write a C++ program (be it C++/CLI or plain C++) to automate some SFTP transfers which may happen per minute, per X minute, per hour, or even per day. Speed is a concern for me, especially transfers happen per minute. If there is another library which can perform better, please also let me know. Thanks.

Was it helpful?

Solution

I figure it out! Sorry about that. It is version mismatch. The version of WinSCP.exe is different from WinSCPnet.dll (the assembly).

I use the source code of the latest version of WinSCP. I use the dotnet\WinSCPnet.csproj in the source. I add the project to the C# example. Compile the assembly and then C# example. The example runs immediately, but then I see a message saying the compiled assembly has a version mismatch between dot net assembly and WinSCP.exe.

Once I make sure both (assembly and EXE) are the same version (5.5.2), the C# example runs successfully (without any startup delay).

[EDIT] Actually the delay happens in 5.5.1!

I play around with version 5.5.1 and 5.5.2. I use version 5.5.1 EXE and dot net assembly with the C# example. When the program starts up, there is delay. I switch to version 5.5.2. When the program starts up, it runs immediately.

Hope this version information helps anyone needs to use WinSCP dot net assmebly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top