madskristensen / OpenCommandLine

A Visual Studio extension
http://vsixgallery.com/extension/f4ab1e64-5d35-4f06-bad9-bf414f4b3bbb/
Other
160 stars 47 forks source link

Cannot use wsl command (Windows Subsystem for Linux) #78

Closed stamminator closed 3 months ago

stamminator commented 5 years ago

In addition to other issues that PowerShell has when launched from OCL, the wsl command also does not work. Opening the distro by name (e.g. the ubuntu command), but this is not sufficient for most WSL interop workflows. The solution to this issue, as well as the one I linked above (as provided in @dubeg's answer), is to set up OCL to launch powershell.exe at the following path:

C:\WINDOWS\sysnative\WindowsPowerShell\v1.0\powershell.exe

It seems to me that this path should be the default for all presets using PowerShell so that all these issues (no PSReadline, no WSL, and who knows what else) are taken care of out of the box. I don't know if this could cause any problems for people running VS on 32-bit machines, but in 2019, that's got to be hardly anybody.