powershell - How to display msbuild errors on the overview page from TeamCity -


i want use powershell psake , teamcity configure ci. used standard msbuild runner wrote own script building solution have problem when msbuild failed.

when using msbuild runner , build failed on overview page new section “build errors” appears , have there detail msbuild. when wrote custom scripts got error “process exited code 1” , don’t know how “create” build errors section. know how this? know can use service messages can't handle failed log msbuild.

task compile { try {    exec { msbuild $code_dir\samplesolution.sln /t:build /p:configuration=release } } catch {    write-host $_ #only information error occured, without msbui details } } 

you can specify log msbuild

parse error log or attach whole log build artifact.

##teamcity[publishartifacts '.\msbuild.log'] 

to fail build can use following message

write-output "##teamcity[message text='ms build failed' status='error']" 

you can messages can used here


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -