I have found that creating a zip file using the Zip task provided by MSBuild Community Tasks changes (or rather, deletes) any file attributes of the files being zipped. Here is one of my calls to the Attrib task to make DLLs inside a folder have the read-only attribute:
<Attrib ReadOnly="true" Normal="true" Files="@(DLLsToReadOnly)" />
Down the road, I included these DLLs in a FilesToZip Item and called the following:
<Zip Files="@(FilesToZip)" WorkingDirectory="$(Directory with files)" ZipFileName="$(DropLocation)\$(Zip file name).zip" />
Upon inspection of the extracted files, I found that none of the DLLs had a read-only attribute (much less, any). Looking in the folder with the DLLs where the Zip task grabbed the files from showed that the DLLs had the attribute R (for Read-Only).
Having read both the documentation and the source code, I could not find any properties that I could set to tell the task to keep file attributes. Is there a substitute that I can use that would keep file attributes intact? I have tried looking into ICSharpCode.SharpZipLib as the Zip class in the Community Tasks source references it, but so far, I haven't been able to make much out of it.
(I am using Community Tasks version 1.2.0.306)