Ensure *.CopyComplete file gets removed on Clean#2878
Conversation
rainersigwald
left a comment
There was a problem hiding this comment.
We should totally do this. Nit on the implementation.
There was a problem hiding this comment.
Could you instead do this?
<Touch Files="@(CopyUpToDateMarker)"
AlwaysCreate="true"
Condition="'@(ReferencesCopiedInThisBuild)' != ''">
<Output TaskParameter="TouchedFiles" ItemName="FileWritesShareable"/>
</Touch>That is more parallel to the copy task above, and it might be infinitesimally faster to avoid the additional implied item creation below.
There was a problem hiding this comment.
Yes, that is definitely better. BTW, why *Shareable? IIUC, this file should get removed if the project's build outputs are being removed. Please correct me if I'm wrong.
There was a problem hiding this comment.
You're right, use FileWrites, not -Shareable. That naming convention never really sunk in for me and I find it confusing every time I have to think about it.
There was a problem hiding this comment.
For posterity: I was very, very wrong on this: #6917.
The @(CopyUpToDateMarker) file is not added to @(FileWrites), so it gets left behind after a Clean. https://bugzilla.xamarin.com/show_bug.cgi?id=58174 - This is a Xamarin.Android bug, but the same issue is reproducible with regular .net projects too
|
Updated. |
|
Looks good, thanks! |
The @(CopyUpToDateMarker) file is not added to @(FileWrites), so it gets left behind after a Clean. https://bugzilla.xamarin.com/show_bug.cgi?id=58174 - This is a Xamarin.Android bug, but the same issue is reproducible with regular .net projects too
The @(CopyUpToDateMarker) file is not added to @(FileWrites), so it gets
left behind after a Clean.
https://bugzilla.xamarin.com/show_bug.cgi?id=58174
regular .net projects too