Compile the *. sln project in batches and compile the. sln project in batches.
Batch Processing is to directly call devenv.exe in the Microsoft Visual Studio 8 \ Common7 \ IDE \ directory. After it is started, it is the IDE. The provided parameters are as follows:
Usage:
Devenv [solutionfile | projectfile | anyfile. ext] [switches]
The first parameter of devenv is usually a solution file or project file. If you want to automatically open the file in the editor, you can also use any other file as the first parameter. When you enter a project file, IDE searches for the. sln file with the same base name as the project file in the parent directory of the project file. If the. sln file does not exist, IDE searches for a single. sln file that references the project. If such a single. sln file does not exist, IDE will create a solution with the default. sln file name and not saved. The base name is the same as the base name of the project file.
Command Line Compilation:
Devenv solutionfile. sln/build solutionconfig [/project projectnameorfile [/projectconfig name]
Available command line switches:
/Build |
Use the specified solution configuration to generate a solution or Project. For example, "Debug ". If there may be multiple platforms, The configuration name must be enclosed in quotation marks. The name of the platform. For example, "Debug | Win32 ". |
/Clean |
Delete the generated result. |
/Command |
Start the IDE and execute this command. |
/Deploy |
Generate and deploy the specified generation configuration. |
/Edit |
Open Specifies the file. If no running instance exists, Start a new instance with a simplified window layout. |
/LCID |
Set the default language used in IDE for the user interface. |
/Log |
Records the IDE activity to a specified file for troubleshooting. |
/NoVSIP |
Disable the VSIP developer license key for the VSIP test. |
/Out |
Append the generated log to the specified file. |
/Project |
Specifies the project to be generated, cleared, or deployed. Must be used with/Build,/Rebuild,/Clean, or/Deploy. |
/ProjectConfig |
Rewrite Solution The project configuration specified in the configuration. For example, "Debug ". If possible For multiple platforms, the configuration name must be enclosed in quotation marks The name of the platform. For example, "Debug | Win32 ". Must be used with/Project. |
/Rebuild |
First clean up, and then use the specified configuration to generate Solution or project. |
/ResetAddin |
Removes the commands and command user interfaces associated with a specific external program. |
/ResetSettings |
Restore the default settings of the IDE. You can also reset it The specified VSSettings file. |
/ResetSkipPkgs |
Clear all SkipLoading tags added to VSPackages. |
/Run |
Compile and run the specified solution. |
/RunExit |
Compile and run the specified solution and then close the IDE. |
/SafeMode |
Start the IDE in safe mode and load a minimum number of windows. |
/Upgrade |
Upgrade a project or solution and all of the projects. And create backups of these files accordingly. Backup For more information about the process, see "Visual Studio conversion wizard. |
Product-specific switches:
/Debugexe |
Open the specified executable file to be debugged. The rest of the command line is passed to this execution file as its parameter. |
/Useenv |
Use PATH, INCLUDE, LIBPATH |
To attach a debugger from a command line, use:
VsJITDebugger.exe-p
Compile Batch Processing
:
# Project directory: d: \ System Platform \
Directory of the Project SLN file: d: \ System Platform \ infotech. activexengine \
Project SLN file name: infotech. activexengine. sln
Compile Log File Name: output.txt
Total log File Name (location): d: \ System Platform \ Rebuilder. log
:
@ Echo off
�Te % # output date
D: # Switch the drive
Cd d: \ System Platform \ # enter the Directory
Echo creation date te %> d: \ System Platform \ Rebuilder. log # write date to the total log File
Cd d: \ System Platform \ infotech. activexengine \ # enter the project directory
"D: \ Program Files \ Microsoft Visual Studio 8 \ Common7 \ IDE \ devenv.exe" infotech. activexengine. sln/rebuild RELEASE/out output.txt # Run the command to compile the project in the Release Mode
Type output.txt> d: \ System Platform \ Rebuilder. log # Write logs to the total log
Echo build
> D: \ System Platform \ Rebuilder. log # Write completion Information
Notepad d: \ System Platform \ Rebuilder. log # Use the WordPad to display the total compiled logs for ease of viewing
Pause # pause
Running the batch processing file will compile the Infotech. ActivexEngine project and display the compilation result to the Rebuilder. log file.
BusyBeeBuilder
DevBuildRunner
. NETPre-Build
BuildStudio
CruiseControl. NET
NAntContrib
From: http://www.cnblogs.com/Chinasf/archive/2006/08/10/473814.html
How to Use batch processing to compile the projects above VS2008? Extra points for your help ···
@ Echo off
Start "D: \ Program Files \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ devenv.exe" E: \ 4GAF-Projects \ 4SSystem \ 4SService \ SourceCode \ 4SService. sln
I don't know whether to use it or not.
How to Use batch processing to compile the vc2010 project? Guidance,
Use nmake.exe
The command syntax is as follows:
NMAKE [option...] [macros...] [targets...] [@ commandfile...]
Note: options is the NMAKE option, macros is the macro definition in the command line, and targets is the list of NMAKE target files, commandfile is a text file (or response file) that contains command line input ).
NMAKE uses the Makefile with the specified/F option (the file is usually named makefile). If the/F option is not specified, the Makefile in the current directory is used. If no Makefile is specified, NMAKE uses the inference rule to generate the command line targets.
The key is to write this makefile. Here is an example.
BIN = cppunit
DEBUG = 1
# Dynamic dll 1, static lib 2, exe 3
TARGET_TYPE = 1
# Thread model, 0 single, 1 multiple static, 2 multiple dll
THREAD_MODEL = 2
CPU = x86
UNICODE = 0
CINCLUDE_PATH =/I./I... \ .. \ include
LLIBS =
DLLFLAGS =
CFLAGS =/W4/Zc: forScope/Zc: wchar_t/ESCs
CFLAGS = $ (CFLAGS) $ (CINCLUDE_PATH)
! IF "$ (UNICODE)" = "1"
CFLAGS = $ (CFLAGS)/D "_ UNICODE"/D "UNICODE"
! ENDIF
LDFLAGS =/NOLOGO/MACHINE: $ (CPU)
LDFLAGS = $ (LDFLAGS) $ (LLIBS)
TARGET =
! IF "$ (DEBUG)" = "1"
TARGET = $ (BIN) d
CFLAGS = $ (CFLAGS)/Od/Ob0/ZI/D "_ DEBUG"
LDFLAGS = $ (LDFLAGS)/DEBUG
! ELSE
TARGET = $ (BIN)
CFLAGS = $ (CFLAGS)/O2/Ob1/Zi/D "NDEBUG"
LDFLAGS = $ (LDFLAGS)/OPT: REF/OPT: ICF
! ENDIF
LINK_TOOL =
! IF "$ (TARGET_TYPE)" = "1"
LINK_TOOL = LINK/DLL/MANIFEST: NO
TARGET = $ (TARGET). dll
! ELSEIF "$ (TARGET_TYPE)" = "2"
LINK_TOOL = LIB
TARGET = $ (TARGET). lib
! ELSE
TARGET = destination (targetcmd.exe
LINK_TOOL = LINK/MANIFEST: NO
! ENDIF
! IF "$ (THR ...... remaining full text>