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 (#6928)" (#7642)

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 authored May 25, 2022
1 parent b8d947f commit 4646eab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion documentation/wiki/ChangeWaves.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ A wave of features is set to "rotate out" (i.e. become standard functionality) t

### 17.4
- [Respect deps.json when loading assemblies](https://github.com/dotnet/msbuild/pull/7520)
- [Remove opt in for new schema for CombineTargetFrameworkInfoProperties](https://github.com/dotnet/msbuild/pull/6928)
- [Consider `Platform` as default during Platform Negotiation](https://github.com/dotnet/msbuild/pull/7511)
- [Adding accepted SDK name match pattern to SDK manifests](https://github.com/dotnet/msbuild/pull/7597)

Expand Down
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 4646eab

Please sign in to comment.