Post-build event command line

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.