大家好我编写了一个PowerShell脚本来自动化构建,这对于调试模式来说很好用
清洁
$Configuration = "Debug"
$BuildArgs = @{
FilePath = $MsBuild
ArgumentList = $SlnFilePath, "/t:clean", ("/p:Configuration=" + $Configuration), "/v:minimal"
RedirectStandardOutput = $BuildLog
Wait = $true
}
Start-Process @BuildArgs
构建
$Configuration = "Debug"
$BuildArgs = @{
FilePath = $MsBuild
ArgumentList = $SlnFilePath, "/t:rebuild", ("/p:Configuration=" + $Configuration), "/v:minimal"
RedirectStandardOutput = $BuildLog
Wait = $true
}
Start-Process @BuildArgs
但是当我按如下方式更改参数列表时
ArgumentList = $SlnFilePath, "/t:clean", ("/p:Configuration=Release /p:PlatformTarget=86"), "/v:minimal"
这不是清理,重建解决方案可以帮助我
答案 0 :(得分:0)
我明白了
修改了这个
ArgumentList = $SlnFilePath, "/t:clean", ("/p:Configuration=Release /p:PlatformTarget=86"), "/v:minimal"
如下
ArgumentList = $SlnFilePath, "/t:clean", ("/p:Configuration=Release /p:PlatformTarget=X86"), "/v:minimal"