sftpclient.DownloadFile(_localFileName, fs, null); ERROR: DownloadFile is not a member of SftpClient

Jul 1, 2015 at 4:57 PM
Hi,

I have made the connection to SFTP server using SftpClient class successfully.

I am trying to execute below syntax,
sftpclient.DownloadFile(_localFileName, fs, null);

where fs is my File string object of System.IO.FileStream().

But i am getting below error:

Microsoft.Dynamics.AX.ManagedInterop.ClrBridgeException: DownloadFile is not a member of SftpClient

at Microsoft.Dynamics.AX.ManagedInterop.ClrBridgeImpl.GetMethodInfo(ClrBridgeImpl* , Type pType, Char* pszMethodName, Type[] argumentTypes)

at Microsoft.Dynamics.AX.ManagedInterop.ClrBridgeImpl.InvokeClrInstanceMethod(ClrBridgeImpl* , ObjectWrapper* objectWrapper, Char* pszMethodName, Int32 argsLength, ObjectWrapper** arguments, Boolean* argsAreByRef, Boolean* isException)

Kindly help.

regards,
Oct 15, 2015 at 8:55 PM
Edited Oct 15, 2015 at 8:58 PM
I'm getting the same issue, did you ever find a solution?

or more specifically: "'Renci.SshNet.ScpClient' does not contain a definition for 'DownloadFile' and no extension method 'DownloadFile' accepting a first argument of type 'Renci.SshNet.ScpClient' could be found (are you missing a using directive or an assembly reference?)"