pre-build-event

How to delete files in Visual Studio Pre-build event command line

﹥>﹥吖頭↗ 提交于 2019-11-27 01:43:53
问题 I am trying to delete files in my $(TargetDir) within visual studio before building a project. How do you have to format command line to get around this problem I am getting below? 回答1: Try cd $(TargetDir) del *.tif As jvenema pointed out, your $(TargetDir) is expanding into a path containing spaces in the folder names which is breaking the delete command. 回答2: I ended up using rd /s /q "$(TargetDir)" to clean out the directory. As far as I know it is working. 回答3: Try adding quotes around

Delphi pre-build event not executing BEFORE compile

試著忘記壹切 提交于 2019-11-26 20:26:48
问题 I'm busy automating our builds to include the svn revision number. We're using Delphi 2010. I added a pre-build event calling a batch file that injects the the svn revision number (read from the entries file in the .svn directory) and a specified version number into aVersionInfo.rc that is compiled with my project. The pre-build event looks like this: call SetVersionInfo.bat 6 5 4 ...and the batch file (hope someone finds this useful)... @ECHO OFF SETLOCAL setLocal EnableDelayedExpansion SET

Solution-wide pre-build event?

℡╲_俬逩灬. 提交于 2019-11-26 10:38:45
问题 I have a solution in Visual Studio which contains several projects. I\'d like to run a command at the very beginning of every build - no matter which projects are involved and whether or not they are up-to-date. Essentially I need something similar to a solution-wide pre-build event, but unfortunately VS does not appear to support these. Does anyone know an alternative way of achieving what I need? 回答1: Unusual requirement. But it can be done. Add a new project to your solution, use the