Connecting to the Windows Subsystem for Linux from Visual Studio 2017

孤者浪人 提交于 2019-12-04 10:27:08

Yes, it looks like this issue has already been reported here and here.

According to a recent comment on the latter thread, the problem has been resolved in Windows Insider build 16199. Depending on your circumstances, this might be an option for you until such time as the fix is incorporated into the release version.

If you are in a production environment, I recommend continuing to use the VM. I've not personally had too much trouble with Windows Insider builds, but there's always some risk involved.

I faced the same problem with windows build with 16299 and am able to resolve the issue now. Posting the resolution in case it helps any other fellow programmer. (Though James might have already resolved it)

WSL lacks open ssh server by default. It has to be configured first for you to be able to connect with Visual Studio

To double check this. Go to Powershell and run netstat -an. I was not able to find anything running on localhost::22.

Follow these instructions toInstall open ssh on WSL install and run open ssh server.

In the output of nestat -an, now you should see something like below

  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:22             0.0.0.0:0              LISTENING

Now, I am able to connect VS to WSL. :-) Cheers!!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!