Skip to content

Commit

Permalink
Revert "Remove opt in for new schema for CombineTargetFrameworkInfoPr…
Browse files Browse the repository at this point in the history
…operties (dotnet#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 fe4fde9.

Conflicts:
	src/Framework/ChangeWaves.cs
	src/Tasks/CombineTargetFrameworkInfoProperties.cs
  • Loading branch information
rainersigwald committed May 20, 2022
1 parent ac305ec commit 8eda4ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/Tasks/CombineTargetFrameworkInfoProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
7 changes: 6 additions & 1 deletion src/Tasks/Microsoft.Common.CurrentVersion.targets
Original file line number Diff line number Diff line change
Expand Up @@ -1907,9 +1907,14 @@ Copyright (C) Microsoft Corporation. All rights reserved.
</_AdditionalTargetFrameworkInfoPropertyWithValue>
</ItemGroup>

<PropertyGroup>
<_UseAttributeForTargetFrameworkInfoPropertyNames Condition="'$(_UseAttributeForTargetFrameworkInfoPropertyNames)' == ''">false</_UseAttributeForTargetFrameworkInfoPropertyNames>
</PropertyGroup>

<CombineTargetFrameworkInfoProperties
RootElementName="$(TargetFramework)"
PropertiesAndValues="@(_AdditionalTargetFrameworkInfoPropertyWithValue)">
PropertiesAndValues="@(_AdditionalTargetFrameworkInfoPropertyWithValue)"
UseAttributeForTargetFrameworkInfoPropertyNames="$(_UseAttributeForTargetFrameworkInfoPropertyNames)">
<Output TaskParameter="Result"
PropertyName="_AdditionalTargetFrameworkInfoProperties"/>
</CombineTargetFrameworkInfoProperties>
Expand Down

0 comments on commit 8eda4ff

Please sign in to comment.