How to use using "Renci.Sshnet" in Vscode on Macos?

Asked

Viewed 14 times

1

using System;
using Renci.SshNet;


namespace SSHTest
{
    class Program
    {
        static void Main(string[] args)
        {
            SshClient cSSH = new SshClient(args[1], 22, args[2], args[3]);
            cSSH.Connect();
            SshCommand c = cSSH.RunCommand(args[1]);
            cSSH.Disconnect();
            cSSH.Dispose();
        }
    }
}

The code compiled without error with the following command: "csc Program.Cs . /bin/Debug/netcoreapp3.1/Renci.SshNet.dll"

And when tried to run, using the command: "mono Program.exe" was returned the following answer: Unhandled Exception: System.IO.Filenotfoundexception: Could not load file or Assembly 'Renci.Sshnet, Version=0.1.0.0, Culture=neutral, Publickeytoken=null' or one of its dependencies. File name: 'Renci.Sshnet, Version=0.1.0.0, Culture=neutral, Publickeytoken=null' [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.Filenotfoundexception: Could not load file or Assembly 'Renci.Sshnet, Version=0.1.0.0, Culture=neutral, Publickeytoken=null' or one of its dependencies. File name: 'Renci.Sshnet, Version=0.1.0.0, Culture=neutral, Publickeytoken=null'

Can anyone help me on how to use this Library, Renci.Sshnet, on the Vscode IDE in the Macos environment ?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.