Kicking off a WSL bash-based build from Visual Studio 2015

ε祈祈猫儿з 提交于 2019-11-29 11:02:09
Harry Gindi

Here's how you have to do it:

Nmake is not a 64-bit application, so when it tries to use Windows utilities and system32, WoW64 tricks it into looking in a different location.

The way you have to launch it from a 32-bit application is:

%windir%\sysnative\bash.exe

However, your command is also malformed. You will need to do it like this:

%windir%\sysnative\bash.exe -c "sh build.sh"

or maybe

%windir%\sysnative\bash.exe -c "./build.sh"

if DriveFS permissions allow execution.

otherwise it will attempt to execute build.sh as a command in your linux user's $PATH.

Source: https://github.com/Microsoft/BashOnWindows/issues/870

This is what I have in my Build Command Line setting. It works fine.

start /WAIT %windir%\sysnative\bash.exe -c "cd /mnt/d/Projects/IoT/ESP8266/;./gen.sh -m DEBUG; read -n 1; exit;"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!