Bug 2239 - Copy task does not set destination file attributes after copying
Summary: Copy task does not set destination file attributes after copying
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2011-11-29 00:42 UTC by Alex Earl
Modified: 2011-12-22 19:18 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Alex Earl 2011-11-29 00:42:01 UTC
The MS msbuild Copy task will set the file attributes of the destination file to FileAttributes.Normal (remove the ReadOnly attribute) after copying the file. This makes it so that if the file is set to always copy to the output directory, no errors are caused for trying to overwrite a read-only file.
Comment 1 Ankit Jain 2011-12-07 09:37:55 UTC
Fixed with ff2b468cab002fc031c1db37ac62e197964c7b25 on master.