I have 3 solutions and solution A requires built versions of the dlls from solution B and C in order to compile. it is not possible to merge it to one solution...
So far
I fixed the issue by putting the script in the pre-build event command line and if project A is failed to build throw msg alert
ECHO "build A project"
set AppMsg ="%SystemRoot%\System32\msg.exe"
set AppMsg
if not "%ProgramFiles(x86)%" == "" (
if exist "%SystemRoot%\Sysnative\*" set AppMsg="%SystemRoot%\Sysnative\msg.exe"
)
set AppMsg
taskkill /f /im "%PROGRAMFILES(X86)%\MSBuild\14.0\Bin\msbuild" "$(SolutionPath)" /t:Project_A_Name /p:Configuration=Debug;TargetFrameworkVersion=v4.5 /p:Platform="Any CPU" /p:BuildProjectReferences=false /p:VSToolsPath="%PROGRAMFILES(X86)%\MSBuild\Microsoft\VisualStudio\v14.0" 2>nul 1>nul
echo ERRORLEVEL %ERRORLEVEL%
if ERRORLEVEL 1 (
ECHO "failed to build test project"
%AppMsg% * "failed to build test project"
)
exit 0