-
Notifications
You must be signed in to change notification settings - Fork 1.4k
ToolTasks Can Log MSB4181 When Cancelled #5508
Copy link
Copy link
Closed
Labels
Area: DebuggabilityIssues impacting the diagnosability of builds, including logging and clearer error messages.Issues impacting the diagnosability of builds, including logging and clearer error messages.Area: TasksIssues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.Issues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.For considerationUsed for items on the backlog to raise them to the top of that list for discussionUsed for items on the backlog to raise them to the top of that list for discussiontriaged
Milestone
Metadata
Metadata
Assignees
Labels
Area: DebuggabilityIssues impacting the diagnosability of builds, including logging and clearer error messages.Issues impacting the diagnosability of builds, including logging and clearer error messages.Area: TasksIssues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.Issues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.For considerationUsed for items on the backlog to raise them to the top of that list for discussionUsed for items on the backlog to raise them to the top of that list for discussiontriaged
Type
Fields
Give feedbackNo fields configured for issues without a type.
Steps to reproduce
Assume there is a tool named "sleep" in the path. Build this project, then hit Ctrl-C.
Actual behavior
Expected behavior
If the task was canceled, suppress MSB4181.
MSB4181 is a grumble that the task does not follow the contract of "return false if an only if you logged an error". But in the case of cancelation, this error is useless for the user, who just hit Ctrl-C, and for the task author, who returned immediately exactly as the engine required them to. We don't want task authors to start logging bogus errors on cancelation. Just continue and fail the build with
MSB4188: Build was canceledin the normal way.Environment data