Skip to content

Dotnet publish container regression in 8.0.400 #587

@Vhab

Description

@Vhab

We're still gathering more information, but would like to already start the conversation and see if we're the only one affected.

Since yesterday's release of .NET 8.0.400, our CI pipelines are unable to build containerized versions of our application.

The error we're seeing is as follows:

MSBUILD : error MSB4166: Child node "2" exited prematurely. Shutting down. Diagnostic information may be found in files in "/tmp/MSBuildTemproot/" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory.
MSBUILD : error MSB4166: /tmp/MSBuildTemproot/MSBuild_pid-950_544b456e882e4927b4070035db4a49df.failure.txt:
MSBUILD : error MSB4166: UNHANDLED EXCEPTIONS FROM PROCESS 950:
MSBUILD : error MSB4166: =====================
MSBUILD : error MSB4166: 08/13/2024 21:05:27
MSBUILD : error MSB4166: System.ArgumentNullException: Value cannot be null. (Parameter 'value')
MSBUILD : error MSB4166:    at System.ArgumentNullException.Throw(String paramName)
MSBUILD : error MSB4166:    at System.IO.BinaryWriter.Write(String value)
MSBUILD : error MSB4166:    at Microsoft.Build.Framework.TelemetryEventArgs.WriteToStream(BinaryWriter writer)
MSBUILD : error MSB4166:    at Microsoft.Build.Shared.LogMessagePacketBase.WriteToStream(ITranslator translator)
MSBUILD : error MSB4166:    at Microsoft.Build.BackEnd.NodeEndpointOutOfProcBase.RunReadLoop(Stream localReadPipe, Stream localWritePipe, ConcurrentQueue`1 localPacketQueue, AutoResetEvent localPacketAvailable, AutoResetEvent localTerminatePacketPump)
MSBUILD : error MSB4166: ===================

The logfiles mentioned in the error don't contain any additional information not already printed in the log above.

Our build command looks as following and is being executed on ubuntu:

        dotnet publish \
          "${{ container.projectPath }}" \
          --os linux \
          --arch x64 \
          -c Release \
          "/p:ContainerRepository=${{ container.containerName }}" \
          "/p:ContainerImageTag=${{ parameters.version }}" \
          "/p:ContainerArchiveOutputPath=$(Build.ArtifactStagingDirectory)/${{ parameters.artifactsName }}/${{ container.containerName }}-${{ parameters.version }}.tgz" \
          /t:PublishContainer

We're not seeing the same error with dotnet build, and not with any non-container dotnet publish steps we have.

I have since been able to reproduce this on Windows 11 + .NET SDK 8.0.400 as well, with the simplified command: dotnet publish /t:PublishContainer myproject.csproj

Will try to create a minimal .csproj to reproduce.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions