System.MissingMethodException: Method not found: 'Void Renci.SshNet.SshClient..ctor(System.String, System.String, Renci.SshNet.PrivateKeyFile[])'.
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.<Execute>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.
A few more details:
C:\Users\ericj>ssh -V OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
Ok, here's how I was able to make this work, but I'm not sure all steps are needed:
- 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.
- 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.
Hey, sorry, I don't have time to maintain this project properly, as far as I know things still work, but there will be some rough edges with newer stuff like ed25519.
I hope it worked for you in the end though!