I found that all you need is the path.
Run VsDevCmd.bat from DOS, then pipe out SET to a file (SET > c:\temp\set.txt
)
From that file extract the PATH and convert it to Linux format - C:\Program Files
becomes /cygdrive/c/Program Files
and the \
all become /
. The replace the ;
with :
.
Then edit your "${HOME}/.bashrc" file - append the above to the PATH - don't forget to add a :
to the end of the original path.
My "${HOME}/.bashrc" now says the following - but copy it at your own risk.
export PATH="/c/bin:/usr/local/bin:/usr/bin:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.11.25503/bin/HostX86/x86:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/Common7/IDE/VC/VCPackages:/cygdrive/c/Program Files/Microsoft SDKs/TypeScript/2.3:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/Common7/IDE/CommonExtensions/Microsoft/TestWindow:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/MSBuild/15.0/bin/Roslyn:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/Team Tools/Performance Tools:/cygdrive/c/Program Files/HTML Help Workshop:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional//MSBuild/15.0/bin:C:/Windows/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/Common7/IDE/:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/Common7/Tools/:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.11.25503/bin/HostX86/x86:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/Common7/IDE/VC/VCPackages:/cygdrive/c/Program Files/Microsoft SDKs/TypeScript/2.3:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/Common7/IDE/CommonExtensions/Microsoft/TestWindow:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/MSBuild/15.0/bin/Roslyn:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/Team Tools/Performance Tools:/cygdrive/c/Program Files/HTML Help Workshop:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional//MSBuild/15.0/bin:C:/Windows/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/Common7/IDE/:/cygdrive/c/Program Files/Microsoft Visual Studio/2017/Professional/Common7/Tools/:/cygdrive/c/Program Files/Windows Kits/8.0/bin/x86:/cygdrive/c/Program Files/Microsoft SDKs/F#/3.0/Framework/v4.0/:C:/Windows/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Program Files/CMake/bin:$PATH:$HOME/bin"