-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Priority:1Work that is critical for the release, but we could probably ship withoutWork that is critical for the release, but we could probably ship withoutbugtriaged
Description
Issue Description
Subitem of #6215
In order to transfer exceptions cross worker node boundaries the TranslateException Translator method uses TranslateDotNet member which relies upon BinaryFormatter.
The goal of this task is to rework TranslateException so that it doesn't rely upon BinaryFormatter.
This is a high priority item as current MSBuild insertion in SDK breaks due to this: #6215 (comment)
Steps to Reproduce
- Get the latest SDK build from https://github.com/dotnet/installer#installers-and-binaries
- Download and extract the lates zip for main build
- Point
DOTNET_MSBUILD_SDK_RESOLVER_SDKS_DIR,DOTNET_ROOT,PATHto the extracted SDK (you can follow https://github.com/dotnet/sdk/blob/main/eng/dogfood.ps1#L38-L47) - Verify proper dotnet redirection via
dotnet --versioncommand - Use project with malformed property
Condition- you can use this one BinaryFormatter Deprecation #6215 (comment) - Make sure to force cross nodes communication (
$env:MSBUILDNOINPROCNODE=1and$env:MSBUILDDISABLENODEREUSE=1) - Build the project
Expected Behavior
Build fails, but MSBuild doesn't crash
Actual Behavior
MSBuild crashes:
(...)
MSBUILD : error MSB4166: UNHANDLED EXCEPTIONS FROM PROCESS 25752:
MSBUILD : error MSB4166: =====================
MSBUILD : error MSB4166: 5/22/2023 11:10:07 AM
MSBUILD : error MSB4166: System.NotSupportedException: BinaryFormatter serialization and deserialization are disabled withi
n this application. See https://aka.ms/binaryformatter for more information.
MSBUILD : error MSB4166: at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializatio
nStream, Object graph)
MSBUILD : error MSB4166: at Microsoft.Build.Execution.BuildResult.Microsoft.Build.BackEnd.ITranslatable.Translate(ITrans
lator translator)
MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.NodeEndpointOutOfProcBase.RunReadLoop(Stream localReadPipe, Stream l
ocalWritePipe, ConcurrentQueue`1 localPacketQueue, AutoResetEvent localPacketAvailable, AutoResetEvent localTerminatePacket
Pump)
MSBUILD : error MSB4166: ===================
(...)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Priority:1Work that is critical for the release, but we could probably ship withoutWork that is critical for the release, but we could probably ship withoutbugtriaged