一、MSBuild并发编译
平常使用Jenkins构建项目时,默认使用MSbuild中没有带并发参数,所以比较慢
不带并发参数构建为
msbuild 项目路径
带并发参数, 只要有这个开关默认使用最大的并发数,当然你也可以指定CPU的数量
msbuild 项目路径 -maxCpuCount
当然这里只是简写,还有很多参数需要你根据自己具体项目添加
写一个bat批处理计算编译花费时间
@echo off
setlocal
rem The format of %TIME% is HH:MM:SS,CS for example 23:59:59,99
set STARTTIME=%TIME%
rem here begins the command you want to measure
:: ====================== msbuild命令行 ===================
rem here ends the command you want to measure
set ENDTIME=%TIME%
rem output as ti