While using client.LogWriter it is showing sftp does not contain definition even rebex.common.dll is referenced

0 votes
asked Oct 19 by Sharmy (120 points)
Applies to: Rebex SFTP

1 Answer

0 votes
answered Oct 19 by Lukas Pokorny (116,670 points)

You need to reference Rebex.Common.dll, Rebex.Networking.dll, Rebex.Sftp.dll. And don't forget to add using Rebex; & using Rebex.Net;.

Does the following code work?

using System;
using Rebex;
using Rebex.Net;

namespace Sample
{
    class Program
    {
        static void Main()
        {
            using (var client = new Sftp())
            {
                client.LogWriter = new FileLogWriter("log.txt", LogLevel.Debug);
                client.Connect("test.rebex.net");
                client.Login("demo", "password");
                client.GetRawList();
            }
        }
    }
}
...