From 32e230a93322f733b44772c4e7d7661262ab3db1 Mon Sep 17 00:00:00 2001 From: Giovanni Bozzano Date: Tue, 2 Sep 2025 17:28:27 +0200 Subject: [PATCH] Ignore destination symbolic links during build acceleration --- .../BuildUpToDateCheck.FileSystemOperationAggregator.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/BuildUpToDateCheck.FileSystemOperationAggregator.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/BuildUpToDateCheck.FileSystemOperationAggregator.cs index e90ad7068f7..736e82a771c 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/BuildUpToDateCheck.FileSystemOperationAggregator.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/BuildUpToDateCheck.FileSystemOperationAggregator.cs @@ -174,8 +174,12 @@ public void AddCopy(string source, string destination) // TODO add retry logic in case of failed copies? MSBuild does this with CopyRetryCount and CopyRetryDelayMilliseconds - // Copy the file - _fileSystem.CopyFile(source, destination, overwrite: true, clearReadOnly: true); + FileInfo destinationFileInfo = new(destination); + if (!destinationFileInfo.Attributes.HasFlag(FileAttributes.ReparsePoint)) + { + // Copy the file + _fileSystem.CopyFile(source, destination, overwrite: true, clearReadOnly: true); + } copyCount++; }