{
"ErrorMessage" : "MSB0001: Internal MSBuild Error: must be valid",
"BuildRetry": true,
"ErrorPattern": "",
"ExcludeConsoleLog": false
}
@dotnet/dnceng
Release Note Category
Feature changes/additions
Bug fixes
Internal Infrastructure Improvements
Release Note Description
Additional information about the issue reported
MSBUILD : error MSB4166: Child node "3" 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-14914_ef532437860e4947b63c7a07fa167972.failure.txt:
MSBUILD : error MSB4166: UNHANDLED EXCEPTIONS FROM PROCESS 14914:
MSBUILD : error MSB4166: =====================
MSBUILD : error MSB4166: 07/08/2024 11:37:54
MSBUILD : error MSB4166: Microsoft.Build.Framework.InternalErrorException: MSB0001: Internal MSBuild Error: must be valid
MSBUILD : error MSB4166: at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Exception innerException, Object[] args)
MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Logging.LoggingContext.LogBuildEvent(BuildEventArgs buildEvent)
MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Components.RequestBuilder.AssemblyLoadsTracker.CurrentDomainOnAssemblyLoad(Object sender, AssemblyLoadEventArgs args)
MSBUILD : error MSB4166: ===================
MSBUILD : error MSB4166:
MSBUILD : error MSB4166:
Looks like it's claiming that the LoggingContext is not marked valid, so it's either not fully constructed or was already marked Finished. There shouldn't be a way to get into this situation so this is an MSBuild bug.
I marked this as "BuildRetry": true, we really shouldn't be excusing these in CI because this means the build didn't run. We need folks to retry to ensure we aren't hiding a build break or test failures.
Activity
akoeplinger commented on Jul 8, 2024
@rainersigwald @baronfel any ideas?
baronfel commented on Jul 8, 2024
cc @JanKrivanek as MSBuild kitten
rainersigwald commented on Jul 8, 2024
must be valid is such a bad error message :sigh:
Looks like it's claiming that the LoggingContext is not marked valid, so it's either not fully constructed or was already marked Finished. There shouldn't be a way to get into this situation so this is an MSBuild bug.
akoeplinger commented on Jul 8, 2024
Ok, should I file another issue in dotnet/msbuild then?
JanKrivanek commented on Jul 8, 2024
Yes please - move or copy to dotnet/msbuild
akoeplinger commented on Jul 8, 2024
dotnet/msbuild#10342. I'm keeping this open so the Build Analysis tracking works.
ericstj commented on Aug 9, 2024
I marked this as "BuildRetry": true, we really shouldn't be excusing these in CI because this means the build didn't run. We need folks to retry to ensure we aren't hiding a build break or test failures.
akoeplinger commented on Aug 21, 2025
Build Analysis shows no hits in the last 30 days, closing.