-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
I raise this issue as a result of a gitter discussion.
My scenario: I have a couple of .config files checked in the source control (TFS VC), which needs to be replaced (or re-generated) before I invoke MSBuild.
I use "DeleteFiles" and/or "CleanDirectories" for this kind of stuff from Cake, but both will fail because they refuse to delete "read-only" protected files.
Gary told me that this behavior is by design and is in most cases the logical choice. He pointed me to the FileHelper addin - maybe this would be a good place for this kind of functionality.
My current workaround is trivial:
public void EnsureFileIsWritable(string filePath)
{
System.IO.File.SetAttributes(filePath, FileAttributes.Normal);
}
If you are interested in a PR just let me know.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels