If I start a command prompt from the menu within Visual Studio 2019 then wsl is not availble (and not simply missing a PATH for it):
>wsl
'wsl' is not recognized as an internal or external command,
operable program or batch file.
>dir \windows\system32\wsl.*
Volume in drive C is Windows
Volume Serial Number is FE44-8F04
Directory of c:\windows\system32
File Not Found
If I start a command prompt from start menu (even if I run vcvarsall.bat)
>wsl
My WSL Settings are working
alexp@LT-ALEXP-02:/mnt/c/workspace$
>dir \windows\system32\wsl.*
Volume in drive C is Windows
Volume Serial Number is FE44-8F04
Directory of C:\windows\system32
04/10/2019 04:58 142,848 wsl.exe
1 File(s) 142,848 bytes
0 Dir(s) 518,974,992,384 bytes free
This actually applies to a lot of files in the system32 dir (count of files about 2000 different between the 2 environments) but I noticed this trying to use wsl since I use that a lot in windows command prompt to access bash utilities / tools.
wsl is availble if I start "Developer Command Prompt for VS 2019" from start menu - its only missing if I start this from the "Tools->Visual Studio Command Prompt" menu item within the IDE(and same behaviour in a powershell prompt started from same menu as well)
I'm using the professional edition of Visual Studio but a colleague reproduced the same issue and I believe he was using the community edition.
Anyone got any ideas what is happening here (and how to fix it)?