Skip to content

[8.0.400] MSBuild Crash when publishing containers #42731

@baronfel

Description

@baronfel

In 8.0.400, we added some telemetry (documented here) for container publish to help us direct investment in the tech. This telemetry is reported through MSBuild's built-in telemetry hooks, which for the dotnet CLI ends up forwarding telemetry from MSBuild through the CLI Telemetry's configuration (aka the environment variable mentioned above: DOTNET_CLI_TELEMETRY_OPTOUT).

There was a bug in the MSBuild engine's handling of this telemetry data, which we fixed in this PR, and this bug is the cause of the crash that's reported. We found this error during final testing, but too late to include it in the 400 release, and so began the process of making a hotfix immediately. This hotfix, 8.0.401, should be available in the next day or so.

The main reason we decided to do a hotfix for this is that the proposed workaround - setting DOTNET_CLI_TELEMETRY_OPTOUT to 1/true/other truthy values - did not consistently work in broader testing. This is because MSBuild is a multi-node system, and telemetry events generated on a worker node must be serialized and forwarded to the central node. This serialization is where the bug lies. If you can guarantee that MSBuild operates in a single-node mode (via /m:1 or similar) that may work as a workaround as well, but several high-impact use cases like azd deployment do not expose the configuration necessary to ensure this behavior.

Other reports:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions