From 8eda4ffe00416a0ecf8981991da79046a0785cf2 Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Fri, 20 May 2022 13:16:37 -0500 Subject: [PATCH] Revert "Remove opt in for new schema for CombineTargetFrameworkInfoProperties (#6928)" This caused a regression in scenarios using Visual Studio 17.3 previews with `global.json` files pointing to old .NET SDKs. This reverts commit fe4fde95dee67b8925ff9b22a3d157d1c02e1d7b. Conflicts: src/Framework/ChangeWaves.cs src/Tasks/CombineTargetFrameworkInfoProperties.cs --- src/Tasks/CombineTargetFrameworkInfoProperties.cs | 3 +-- src/Tasks/Microsoft.Common.CurrentVersion.targets | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Tasks/CombineTargetFrameworkInfoProperties.cs b/src/Tasks/CombineTargetFrameworkInfoProperties.cs index 2db3b55580b..4108feb5246 100644 --- a/src/Tasks/CombineTargetFrameworkInfoProperties.cs +++ b/src/Tasks/CombineTargetFrameworkInfoProperties.cs @@ -39,8 +39,7 @@ public override bool Execute() { if (PropertiesAndValues != null) { - // When removing the change wave, also remove UseAttributeForTargetFrameworkInfoPropertyNames. - XElement root = ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave17_4) || UseAttributeForTargetFrameworkInfoPropertyNames ? + XElement root = UseAttributeForTargetFrameworkInfoPropertyNames ? new("TargetFramework", new XAttribute("Name", EscapingUtilities.Escape(RootElementName))) : new(RootElementName); diff --git a/src/Tasks/Microsoft.Common.CurrentVersion.targets b/src/Tasks/Microsoft.Common.CurrentVersion.targets index 01a2850ca17..7b51494d4ed 100644 --- a/src/Tasks/Microsoft.Common.CurrentVersion.targets +++ b/src/Tasks/Microsoft.Common.CurrentVersion.targets @@ -1907,9 +1907,14 @@ Copyright (C) Microsoft Corporation. All rights reserved. + + <_UseAttributeForTargetFrameworkInfoPropertyNames Condition="'$(_UseAttributeForTargetFrameworkInfoPropertyNames)' == ''">false + + + PropertiesAndValues="@(_AdditionalTargetFrameworkInfoPropertyWithValue)" + UseAttributeForTargetFrameworkInfoPropertyNames="$(_UseAttributeForTargetFrameworkInfoPropertyNames)">