Reputation: 183
In TFS 2018, I have a build step which calls on a batch script which sets various environment variables and involves msbuild on a solution file. Currently, if a project has warnings, there's no way to view them in TFS unless you look at the log files and see what the warnings are. If you run a native Visual Studio Build task, warnings are shown to you after a build.
How can I return warnings to TFS after my msbuild command completes?
Upvotes: 0
Views: 350
Reputation: 30372
You can try to return warnings and errors from your script using logging commands.
e.g.:
For PowerShell script you can use below logging commands:
Write-Host "##vso[task.logissue type=warning;]Test warning"
Write-Host "##vso[task.logissue type=error;]Test error"
For Batch script:
@echo ##vso[task.logissue type=warning;]Test warning
@echo ##vso[task.logissue type=error;]Test error
Reference this thread : Is it possible to raise and display build warnings from build steps using TFS 2015?
Upvotes: 1