Commit 5ac2276
committed
FUTDC support for CopyToOutputDirectory="IfDifferent"
The `IfDifferent` value is valid in modern MSBuild:
https://github.com/dotnet/msbuild/blob/863bbb87f1b5cbf792fbefb7005ff83bb8af0e4b/src/MSBuild/MSBuild/Microsoft.Build.CommonTypes.xsd#L776
Without this change, attempting to use it causes an error in the FUTDC:
```
=====================
20-Nov-25 11:17:37
LimitedFunctionality
System.AggregateException: Project system data flow 'UpToDateCheckConfiguredInputDataSource: 36760100' closed because of an exception.
CopyToOutputDirectory should be Always or PreserveNewest, not IfDifferent
---> (Inner Exception #0) Microsoft.Assumes+InternalErrorException: CopyToOutputDirectory should be Always or PreserveNewest, not IfDifferent
at Microsoft.Assumes.Fail(String message)
at Microsoft.VisualStudio.ProjectSystem.VS.UpToDate.CopyItem.<GetCopyType>g__ParseCopyType|15_0(String value)
at Microsoft.VisualStudio.ProjectSystem.VS.UpToDate.CopyItem.GetCopyType(IImmutableDictionary`2 metadata)
at Microsoft.VisualStudio.ProjectSystem.VS.UpToDate.UpToDateCheckImplicitConfiguredInput.<>c.<Update>b__76_24(KeyValuePair`2 pair)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
at Microsoft.VisualStudio.ProjectSystem.VS.UpToDate.UpToDateCheckImplicitConfiguredInput.<>c__DisplayClass76_0.<Update>g__UpdateCopyData|9()
at Microsoft.VisualStudio.ProjectSystem.VS.UpToDate.UpToDateCheckImplicitConfiguredInput.Update(IProjectSubscriptionUpdate jointRuleUpdate, IProjectSubscriptionUpdate sourceItemsUpdate, IProjectItemSchema projectItemSchema, IProjectCatalogSnapshot projectCatalogSnapshot)
at Microsoft.VisualStudio.ProjectSystem.VS.UpToDate.UpToDateCheckImplicitConfiguredInputDataSource.<>c__DisplayClass12_0.<<LinkExternalInput>g__TransformAsync|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.TransformBlockSlim`2.TransformBlockSlimAsync.<ProcessInputAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim`1.<ProcessInputQueueAsync>d__5.MoveNext()
<--- (Inner Exception #0)
===================
```
This change adds support for it. The FUTDC already treats "Always" in the same way as "IfDifferent" (which helps performance a lot), so the user wouldn't notice a difference between these two options for builds in VS, but there would be a different for command-line builds.1 parent 1831049 commit 5ac2276
File tree
4 files changed
+9
-1
lines changed- src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS
- Rules
- UpToDate
4 files changed
+9
-1
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
| 800 | + | |
800 | 801 | | |
801 | 802 | | |
802 | 803 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
0 commit comments