I have been struggling to get my commands to run as expected for pre-build events. They seem to run just fine in 'cmd' window, but not so much in the VS17. I am specifically trying to startup bash (WSL) to run some remote connection sync and I keep getting
errors. I had it all working up until a couple weeks ago when an update broke something. Since then I cannot get it working.
My latest attempt is to wrap it up in a batch file that I know is working in 'cmd' thinking that VS17 must run in a similar environment.
DETAILS:
I know this runs in the 'cmd' window:
cd d:\Repository & sync_and_deploy_wms.bat
However, when running this in VS17 on a build I get this (I have on diagnostic mode build output):
Task Parameter:Command=cd d:\Repository & sync_and_deploy_wms.bat
cd d:\Repository & sync_and_deploy_wms.bat
'c:\WINDOWS\System32\bash.exe' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Application Type\Linux\1.0\Linux.Makefile.Targets(191,5): error MSB3073: The command "cd d:\Repository & sync_and_deploy_wms.bat" exited with code 1.
Done executing task "Exec" -- FAILED.
.................
..............
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Application Type\Linux\1.0\Linux.Makefile.Targets(191,5): error MSB3073: The command "cd d:\Repository & sync_and_deploy_wms.bat" exited with code 1.
The .bat file is very simple, it just fires up bash and runs a command. Again, this was working for many months before an update came along. Here is the .bat file:
cd d:\Repository\wms & c:\WINDOWS\System32\bash.exe -l /mnt/d/Repository/wms/remote_sync
Last time I worked on this it took forever to figure out the "correct" way to setup this command to run in this VS17 environment also, why isn't there more information on the environment that these commands run in? Am I just missing the documentation
somewhere??