I'm currently using an msbuild file to copy some files to the public documents folder when my EXE is compiled. My current script includes this:
<Target Name="DeployToPublicDocuments"
Inputs="@(DeploymentItems)"
Outputs="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)%(DeploymentItems.Extension)">
<Copy SourceFiles="%(DeploymentItems.FullPath)"
DestinationFiles="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)%(DeploymentItems.Extension)"
Condition="!Exists('$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)%(DeploymentItems.Extension)')" />
This code only copies if the destination doesn't exist. However, I want to replace the destination if my source is newer. How do I modify my script to make that happen? I see the SkipUnchangedFiles flag, but it also compares file size to determine if the destination should be overwritten. That is not what I want.