echo off
::设置日志名称
set LogFileName=BuildRelease.log
del %LogFileName%
::设置操作 Build 编译;Clean清理;Rebuild 重新编译
set TargetName=Build
::MSBuild.设置路径
set BuildTool="C:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe"
::设置日志等级
::Diagnostic 4 诊断详细级别,它显示所有错误、警告、消息,状态事件以及生成摘要。
::Detailed 3 详情详细级别,它显示错误、警告、MessageImportance 值为 High 或 Normal 的消息、所有状态事件以及生成摘要。
::Normal 2 普通详细级别,它显示错误、警告、MessageImportance 值为 High 的消息、一些状态事件以及生成摘要。
::Minimal 1 最小详细级别,它显示错误、警告、MessageImportance 值为 High 的消息以及生成摘要。
::Quiet 0 静默详细级别,它显示生成摘要。
set VerbosityLevel=Minimal
::设置解决方案配置 Realse ,Debug 等
set ConfigurationName=Release
echo on
rem 开始编译
%BuildTool% 解决方案名称.sln /t:%TargetName% /p:Configuration=%ConfigurationName% /flp:LogFile=%LogFileName%;Append;Verbosity=%VerbosityLevel%;Encoding=UTF-8
::如有需要拷贝文件到发布目录
::copy "..\Release\xx.exe" "..\Publish\"