Skip to content

RemoveDir task should log an error when failing #6275

@KirillOsenkov

Description

@KirillOsenkov

I randomly saw this output:

C:\MSBuild\eng\BootStrapMSBuild.targets(28,5): error MSB3231: Unable to remove directory "C:\MSBuild\artifacts\bin\boot
strap\net472\MSBuild\". Access to the path 'Microsoft.CodeAnalysis.CSharp.dll' is denied. [C:\MSBuild\src\MSBuild.Boots
trap\MSBuild.Bootstrap.csproj]
C:\MSBuild\eng\BootStrapMSBuild.targets(28,5): error MSB4181: The "RemoveDir" task returned false but did not log an er
ror. [C:\MSBuild\src\MSBuild.Bootstrap\MSBuild.Bootstrap.csproj]

This means when RemoveDir can't remove a directory because of AccessDenied on a file within it, it fails but doesn't log an error.

Metadata

Metadata

Assignees

Labels

Area: DebuggabilityIssues impacting the diagnosability of builds, including logging and clearer error messages.Area: Our Own BuildProblems affecting the build or build infrastructure of the MSBuild repo itself.Area: TasksIssues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.triaged

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions