Hi there.
We started seeing the following intermittent failure when building:
SafeCopyFile Exception was Exception in AutomationUtils.Automation: Object reference not set to an instance of an object.
Debugging it showed that it was due to this recent change not accounting for Windows Data Deduplication.
Deduplicated files get reparse points with tag 0x80000013 (IO_REPARSE_TAG_DEDUP), but they are not symbolic links. ResolveLinkTarget returns null for deduplicated files.
Adding a null check to the code at line 515 of Utils.cs to the following would fix the issue:
if (SourceInfo.Attributes.HasFlag(FileAttributes.ReparsePoint))
{
var ResolvedInfo = SourceInfo.ResolveLinkTarget(true);
if (ResolvedInfo != null)
{
SourceInfo = (FileInfo)ResolvedInfo;
}
}
Thanks,
Malcolm
[Attachment Removed]