Closed Bouke closed 2 years ago
Running parallel builds gives highly random ##[warning]
counts between builds:
Build 16056: 5542 out of 5838 Build 16055: 5347 out of 5838 Build 16057: 5428 out of 5838
Maybe some sort of race-condition inside the logger?
When building locally with the distributed logger (msbuild -dl:"CentralLogger,Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll*ForwardingLogger,Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"
), the warnings reported don't match the console output from msbuild. So the problem is with this logger, which is hard-coded by the MSBuild / VSBuild tasks.
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days
…
Perhaps this will also be fixed as part of #14863
The distributed msbuild logger is used in the msbuild and vsbuild agent tasks to communicate the msbuild errors and warnings. There is a bug in it that it doesn’t correctly report #errors and #warnings to Azure DevOps. If you have a binlog (and can provide it to the right Microsoft people) they can probably replay the log to determine if it is the same problem
Waiting for this PR to be completed and deployed
This issue seems to be a duplicate of #14863, so I am closing it. It should be fixed by #15496. Feel free to provide any related info / ask questions about this issue in #14863.
Required Information
Question, Bug, or Feature? Bug Type: Incorrect build output
Enter Task Name: VSBuild
Environment
Server - Azure Pipelines or TFS on-premises? Azure Pipelines
Agent - Hosted or Private: Hosted
Issue Description
I have a build with the following task
I'm building a task with multiple framework targets:
This builds fine in Azure DevOps / locally. However the warnings generated by either the compiler or roslyn analyzers don't get logged correctly. When running a non-parallel build, only the logs from the net4.8 target are logged. For parallel builds, I'm not sure what to make of the output.
Task logs
The following is (what I think) the relevant parts of the build output. I've ran the pipeline with system diagnostics, to hopefully aid debugging.
This is the net48 build, happening on lines 1054-1095, notice the existence of `##[warning]``:
This is the output (same build / task) for the same project on net5.0 happening on lines 6730-6758, notice the total absence of
##[warning]
and##[debug]
:As said the parallel build is very messy and difficult to read.
Absence of the
##[warning]
makes DevOps not pick up the warnings and causes other tools (like Build Quality Checks) unable to pick up these warnings, causing our software quality to degrade.