radutomy / VSRemoteDebugger

Visual Studio 2022 Remote SSH Debugger for Raspberry Pi / Linux
GNU General Public License v3.0
33 stars 10 forks source link

System.MissingMethodException: Method not found: 'Void Renci.SshNet.SshClient..ctor(System.String, System.String, Renci.SshNet.PrivateKeyFile[])'. #25

Open 3ricj opened 4 hours ago

3ricj commented 4 hours ago

when trying to start remote debugging, I received the following error message:


Microsoft Visual Studio

Error

Cannot connect to ericj:192.168.0.5.:System.MissingMethodException: Method not found: 'Void Renci.SshNet.SshClient..ctor(System.String, System.String, Renci.SshNet.PrivateKeyFile[])'.

at VSRemoteDebugger.RemoteDebugCommand.Bash(String cmd) at VSRemoteDebugger.RemoteDebugCommand.CheckConnWithRemote() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at VSRemoteDebugger.RemoteDebugCommand.d__18.MoveNext()

OK

I've tried to install the ssh.net client into my project via Install-Package, but it still gives me this error. I can ssh in using the key (no pw) from a command prompt. So that's working, I'm not sure what else to check.

3ricj commented 4 hours ago

A few more details:

C:\Users\ericj>ssh -V OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2

3ricj commented 4 hours ago

Ok, here's how I was able to make this work, but I'm not sure all steps are needed:

  1. I downloaded the source, updated all of it's dependencies vi nuget, many packages years out of date -- I'm not sure this was really the problem, but it helped me debug this.
  2. After installing the new built of VSRemoteDebugger, it finally gave me a real error message: It couldn't find the public key. I suspect this was my problem all along -- the newer versions of ssh on windows names the files differently (mine was named id_ed25519, I renamed it to id_pub).

It then .. worked, I think.. but it's still uploading as I type. I hope it's smart enough not to have to upload unchanged files each time, we will find out soon.