Different versions of WinSCP

Advertisement

ianbhenderson73
Joined:
Posts:
4
Location:
Glasgow, Scotland

Different versions of WinSCP

I'm in the process of using the WinSCPnet.dll to transfer files to an SFTP site.

Everything works fine on my development environment, but when one of my users tried to run the application she got an error message, which she kindly forwarded to me.

Basically, I need to know if there's a way of forcing my application to use the .NET assembly that's bundled with it as opposed to the version of the application that's installed on the user's PC. Ultimately I don't want to have to uninstall WinSCP from the user's PCs if I can avoid it.

Incidentally, I downloaded the automation library just this afternoon. The exe file is version 5.7.5.5665 and the DLL file is version 1.2.9.5665.

TIA

Error Message.jpg

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Different versions of WinSCP

See https://winscp.net/eng/docs/library_install#installing

WinSCP .NET assembly uses the winscp.exe that's in the same directory as the winscpnet.dll. Only if it does not find the .exe there is falls back to alternative locations, like the Program Files.

So make sure you deploy the .dll and the .exe to the same directory.

Or use Session.ExecutablePath to set the path to winscp.exe explicitly.
https://winscp.net/eng/docs/library_session

Reply with quote

Advertisement

You can post new topics in this forum