From d7f3733888e3ec48583284f92e36a31ac6d88d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Fri, 18 Oct 2024 20:56:31 -0400 Subject: [PATCH 1/2] fix: Adjust tf reordering for VS 17.12 or later Disables TFM order rewriting for 17.12 where WinAppSDK and desktop support has been updated for supporting any position in the TFMs list. --- src/Uno.Sdk/targets/Uno.Sdk.After.targets | 47 +++++++++++++++++++---- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/src/Uno.Sdk/targets/Uno.Sdk.After.targets b/src/Uno.Sdk/targets/Uno.Sdk.After.targets index 643b98a3e6b9..9fd54bffa063 100644 --- a/src/Uno.Sdk/targets/Uno.Sdk.After.targets +++ b/src/Uno.Sdk/targets/Uno.Sdk.After.targets @@ -41,10 +41,23 @@ + + + + + @@ -120,15 +120,20 @@ BeforeTargets="_SetBuildInnerTarget;_ComputeTargetFrameworkItems;ResolveFrameworkReferences" Condition=" '$(UnoDisableVSWarnDesktopIsNotFirst)' != 'true' - AND $([MSBuild]::VersionGreaterThanOrEquals($(MSBuildVersion), 17.12.0)) AND '$(BuildingInsideVisualStudio)' == 'true' + AND $([MSBuild]::VersionGreaterThanOrEquals($(MSBuildVersion), 17.12.0)) AND '$(_UnoTargetFrameworkCount)' != '' AND $(_UnoTargetFrameworkCount) > 1 AND $(TargetFrameworks.Contains('-desktop')) + AND ( + $(TargetFrameworks.Contains('-ios')) + OR $(TargetFrameworks.Contains('-android')) + OR $(TargetFrameworks.Contains('-maccatalyst')) + ) AND $([MSBuild]::GetTargetPlatformIdentifier($(_UnoFirstOriginalTargetFramework))) != 'desktop'"> + Text="The desktop TargetFramework must be placed first in the TargetFrameworks property in order for WSL debugging to work, when mobile targets are also used. (See https://aka.platform.uno/UNOB0014)" />