I recently started using the Windows Subsystem for Linux (WSL) to see if my Linux Makefile and non-eabi-gcc-based microcontroller project will build โnativelyโ on Windows. To my surprise, the Linux toolchain and development tools were installed and worked great the first time, without any changes to the Makefile.
So, I thought to try all my code editing in Visual Studio using the IDE functions, doing the actual build in Linux and bash provided in WSL.
Unfortunately, when specifying "Build Command Line" in the NMake options for my Visual Studio project, placing "C:\Windows\System32\bash.exe build.sh" does not work because:
'C:\Windows\System32\bash.exe' is not recognized as an internal or external command, operable program or batch file.
This is strange for me because I indicated the full path and could not find the WSL bash executable, and also try to add it as an โexternal toolโ, it seems to not work, because the executable does not work, t is displayed in the selection window. despite the ability to see other executables in the same directory.
Some opinion on the topic: If Microsoft can get Visual Studio and WSL to work together, I would rather switch from my Ubuntu virtual machine installation to the WSL-based development environment.
source share