Both vs2003 and 2005 support build events, but 2003 only supports single-line commands, while 2005 supports multi-line commands.
To execute multi-line commands in 2003, you can only write the commands in a batch file and then execute them by calling batch processing.
1. Use context meun in Solution Explorer to view the project's property.
2. Select build events to view the pre-build and post-build event command line, and the conditions for running the post-build event.
//------------------
Usage collection
1. After building, modify the name (suffix) of the build product and overwrite existing files with the same name.
Copy$ (Targetfilename)$ (Targetname). xxxY
2. Call External commands or batch processing:
Call "C:/program files/xxx.exe"
3. Condition judgment:
If not$ (Configurationname)= Release goto end
Call "C:/program files/xxx.exe"$ (Projectdir)$ (Targetname). CVP
: End
4. Automatic Web project deployment
Copy $ (targetdir) *. * // myserver/myservice/bin
Copy $ (projectdir) *. ascx // myserver/myservice
5. copy from one path to the other path
Copy "$ (projectdir) PRI. bin" "$ (solutiondir) $ (solutionname)/$ (outdir )"
Copy PRI. Bin (File Name) from $ (projectdir) to $ (solutiondir) $ (solutionname)/$ (outdir)
//------------------
Macro collection
$ (Devenvdir)
$ (Projectdir)
$ (Builtouputpath)
$ (Configurationname)
$ (Targetname) does not contain the extension
$ (Targetfilename) contains the extension