如何利用命令行编译VS工程

@echo off
set debugOrRelease=Release
set baseOutPath=%debugOrRelease%


rem 当前脚本所在路径
set build_root = %~dp0
 
rem vcvarsall.bat所在的路径:
set vcvars="%VS140COMNTOOLS%../../VC/vcvarsall.bat"
set devenv="%VS140COMNTOOLS%../IDE/devenv.exe"


rem 设置解决方案的路径
set thesln=./Utilities.sln


echo 上位机程序开始编译 
echo on 


echo 正在编译,请稍后...
@echo on

@%devenv% %thesln% /rebuild %baseOutPath% /out build.log
@echo off
@endlocal

你可能感兴趣的:(VC/MFC)