Skip to content

MSB6006 should special case STATUS_CONTROL_C_EXIT #4832

Open
@danmoseley

Description

@danmoseley

When hitting Ctrl-C during a build, if a child tool was terminated by MSBuild as part of cancelation, you will get something like

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(1235,5): error MSB6006: "Lib.exe" exited with code -1073741510. [C:\git\coreclr\bin\obj\Windows_NT.x64.Release\src\vm
\crossgen\cee_crossgen.vcxproj]

-1073741510. of course is 0xC000013A: STATUS_CONTROL_C_EXIT

Since this is "by design" (MSBuild working properly) perhaps this code could special case it and give a message like error MSB6006: "Lib.exe" exited because it was canceled which looks less like something different went wrong during cancelation.

https://github.com/microsoft/msbuild/blob/b2db71bebaae4f54f7236ca303e2b0a14aca1a0d/src/Utilities/ToolTask.cs#L383-L386

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: DebuggabilityIssues impacting the diagnosability of builds, including logging and clearer error messages.Area: TasksIssues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.help wantedIssues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.triaged

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions