Thursday, August 15, 2013

.bat file for copying about .dll files

This lists "Macros for Build Commands and Properties" such as $(ProjectDir) seen here. The .bat script is going to have something like this inside of it:

set ProjectName=%1
set ProjectDir=%2
set TargetDir=%3
set TargetName=%4
echo WORKFLOW-POSTBUILD for %ProjectName%
xcopy %TargetDir%log4net.dll %ProjectDir%..\..\whatever\ /i /d /y
if errorlevel 1 goto BuildEventFailed
goto BuildEventOK
:BuildEventFailed
echo WORKFLOW-POSTBUILD for %ProjectName% FAILED
exit 1
:BuildEventOK
echo WORKFLOW-POSTBUILD for %ProjectName% SUCCEEDED

No comments:

Post a Comment