Turns out there is a much easier answer: just don't have anything in the path using ~
, and msbuild does just fine with the sh-style path.
A script accomplishing the path fix that isn't too ugly, except for the munging of the path:
#/bin/sh
dospath=`echo ${PATH} |
sed "s-\(^\|:\)~\([/:]\|$\)-\1${HOME}\2-g" |
sed 's-:-;-g' |
sed 's-\(^\|;\)/\([A-Za-z]\)\([/;]\|$\)-\1\2:\3-g' |
sed 's-/-\\\\-g'`
msbuild=`which msbuild.exe`
whichresult=$?
if [ ${whichresult} -eq 0 ]; then
PATH=${dospath}
${msbuild} $@
else
echo 'msbuild.exe not found'
exit ${whichresult}
fi