Skip to content

Commit 3751490

Browse files

File tree

88 files changed

+411
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+411
-1
lines changed

src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Rules/CopyToOutputDirectoryItem.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<EnumValue Name="Never" />
1717
<EnumValue Name="Always" />
1818
<EnumValue Name="PreserveNewest" />
19+
<EnumValue Name="IfDifferent" />
1920
</EnumProperty>
2021

2122
<BoolProperty Name="BuildAccelerationOnly"

src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/BuildUpToDateCheck.CopyType.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ internal sealed partial class BuildUpToDateCheck
1010
internal enum CopyType
1111
{
1212
PreserveNewest,
13+
IfDifferent,
1314
Always
1415
}
1516
}

src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/BuildUpToDateCheck.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,7 @@ private bool CheckCopyToOutputDirectoryItems(Log log, UpToDateCheckImplicitConfi
797797
switch (copyType)
798798
{
799799
case CopyType.Always:
800+
case CopyType.IfDifferent:
800801
{
801802
// We have already validated the presence of these files, so we don't expect these to return
802803
// false. If one of them does, the corresponding size would be zero, so we would schedule a build.

src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/CopyItem.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ static BuildUpToDateCheck.CopyType ParseCopyType(string value)
6969
return BuildUpToDateCheck.CopyType.PreserveNewest;
7070
}
7171

72-
throw Assumes.Fail($"CopyToOutputDirectory should be Always or PreserveNewest, not {value}");
72+
if (string.Equals(value, CopyToOutputDirectoryItem.CopyToOutputDirectoryValues.IfDifferent, StringComparisons.PropertyLiteralValues))
73+
{
74+
return BuildUpToDateCheck.CopyType.IfDifferent;
75+
}
76+
77+
throw Assumes.Fail($"CopyToOutputDirectory should be Always, PreserveNewest or IfDifferent, not {value}");
7378
}
7479
}
7580

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/Items/Compile.BrowseObject.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
DisplayName="Copy always" />
4040
<EnumValue Name="PreserveNewest"
4141
DisplayName="Copy if newer" />
42+
<EnumValue Name="IfDifferent"
43+
DisplayName="Copy if different" />
4244
</EnumProperty>
4345

4446
<StringProperty Name="CustomTool"

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/Items/Content.BrowseObject.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
DisplayName="Copy always" />
4040
<EnumValue Name="PreserveNewest"
4141
DisplayName="Copy if newer" />
42+
<EnumValue Name="IfDifferent"
43+
DisplayName="Copy if different" />
4244
</EnumProperty>
4345

4446
<StringProperty Name="CustomTool"

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/Items/EditorConfigFiles.BrowseObject.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
DisplayName="Copy always" />
4040
<EnumValue Name="PreserveNewest"
4141
DisplayName="Copy if newer" />
42+
<EnumValue Name="IfDifferent"
43+
DisplayName="Copy if different" />
4244
</EnumProperty>
4345

4446
<StringProperty Name="CustomTool"

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/Items/EmbeddedResource.BrowseObject.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
DisplayName="Copy always" />
4040
<EnumValue Name="PreserveNewest"
4141
DisplayName="Copy if newer" />
42+
<EnumValue Name="IfDifferent"
43+
DisplayName="Copy if different" />
4244
</EnumProperty>
4345

4446
<StringProperty Name="CustomTool"

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/Items/None.BrowseObject.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
DisplayName="Copy always" />
4040
<EnumValue Name="PreserveNewest"
4141
DisplayName="Copy if newer" />
42+
<EnumValue Name="IfDifferent"
43+
DisplayName="Copy if different" />
4244
</EnumProperty>
4345

4446
<StringProperty Name="CustomTool"

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/Items/Resource.BrowseObject.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
DisplayName="Copy always" />
4040
<EnumValue Name="PreserveNewest"
4141
DisplayName="Copy if newer" />
42+
<EnumValue Name="IfDifferent"
43+
DisplayName="Copy if different" />
4244
</EnumProperty>
4345

4446
<StringProperty Name="CustomTool"

0 commit comments

Comments
 (0)