Some parameters of my batch file are echoed, while others are not. I would like to see the name of the solution file in the echo statement as well as the name of the solution being built.
Here is the contents of my batch file
echo on
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
set _SCRIPT_DRIVE=%~d0
echo DRIVE %_SCRIPT_DRIVE%
set baseDir=%_SCRIPT_DRIVE%\Source\Service\4.0\Branches\ARES
echo baseDir = %baseDir%
set buildLog=%baseDir%\Build.log
echo deleting build log: %buildLog%
del %buildLog%
set thirdParty=Cert,MDTE
echo.
echo building %thirdParty%
echo.
for %%p in (%thirdParty%) do (
echo.
echo building %%p
cd %%p
set thirdPartySolutionFile=%%p%.sln
echo solution file : %thirdPartySolutionFile%
MSBuild %thirdPartySolutionFile% /t:Rebuild /m /p:Configuration=Debug >> %buildLog%
rem Is this necessary?
set thirdPartySolutionFile=
cd ..
)
exit /B
NOTE: I know the solution file name is getting set, because it builds !
the other thing I am unsure about is resetting the solution file name to an empty string in the for loop ... is that necessary?
This is the output that I get :
F:\Source\Service\4.0\branches\ARES>RebuildAll.bat
F:\Source\Service\4.0\branches\ARES>echo on
F:\Source\Service\4.0\branches\ARES>call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
DRIVE F:
baseDir = F:\Source\Service\4.0\Branches\ARES
here is build log: F:\Source\Service\4.0\Branches\ARES\Build.log
building Cert,MDTE
building Cert
solution file :
building MDTE
solution file :
F:\Source\Service\4.0\branches\ARES>
I expected to see the solution file name in the output as well as what was being built eg:
building Cert
solution file : Cert.sln