From 55f54f7d74bcf4df5403712165c2f49c93962dc1 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 4 Feb 2022 11:29:20 +0100 Subject: [PATCH 1/3] Don't evaluate outer build targets in inner build This is a nit change but it showed up in an msbuild binlog and hence I felt like cleaning this up, now that we already split between inner and outer build via nuget conventions. --- ...DotNet.Build.Tasks.TargetFramework.targets | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.targets b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.targets index 9a67304f564..f3baa42542a 100644 --- a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.targets +++ b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.targets @@ -1,57 +1,7 @@ - - - - - - <_OriginalInnerBuildProjects Include="@(_InnerBuildProjects)" /> - <_InnerBuildProjects Remove="@(_InnerBuildProjects)" /> - <_InnerBuildProjects Include="@(InnerBuildProjectsWithBestTargetFramework)" /> - - - - - - - <_InnerBuildProjects Remove="@(_InnerBuildProjects)" /> - <_InnerBuildProjects Include="@(_OriginalInnerBuildProjects)" /> - - - - - <_BuildTargetFrameworkWithTargetOS Include="$(BuildTargetFramework)-$(TargetOS)" /> - - - <_BuildTargetFrameworkWithoutOS Include="$([MSBuild]::Unescape($([System.Text.RegularExpressions.Regex]::Replace('$(TargetFrameworks)', '(-[^;]+)', ''))))" /> - - <_BuildTargetFrameworkWithTargetOS Include="@(_BuildTargetFrameworkWithoutOS->Distinct()->'%(Identity)-$(TargetOS)')" - Condition="'$(TargetOS)' == 'windows' or !$([System.String]::Copy('%(Identity)').StartsWith('net4'))" /> - - - - - - - - - <_BestTargetFramework Project="$(MSBuildProjectFile)" /> - - - - - + + + + + + <_OriginalInnerBuildProjects Include="@(_InnerBuildProjects)" /> + <_InnerBuildProjects Remove="@(_InnerBuildProjects)" /> + <_InnerBuildProjects Include="@(InnerBuildProjectsWithBestTargetFramework)" /> + + + + + + + <_InnerBuildProjects Remove="@(_InnerBuildProjects)" /> + <_InnerBuildProjects Include="@(_OriginalInnerBuildProjects)" /> + + + + + + <_BuildTargetFrameworkWithTargetOS Include="$(BuildTargetFramework)-$(TargetOS)" /> + + + <_BuildTargetFrameworkWithoutOS Include="$([MSBuild]::Unescape($([System.Text.RegularExpressions.Regex]::Replace('$(TargetFrameworks)', '(-[^;]+)', ''))))" /> + + <_BuildTargetFrameworkWithTargetOS Include="@(_BuildTargetFrameworkWithoutOS->Distinct()->'%(Identity)-$(TargetOS)')" + Condition="'$(TargetOS)' == 'windows' or !$([System.String]::Copy('%(Identity)').StartsWith('net4'))" /> + + + + + + + + + <_BestTargetFramework Project="$(MSBuildProjectFile)" /> + + + From 18925c21a25a62ce152160271c3e8c0e1c9b962b Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 4 Feb 2022 11:34:45 +0100 Subject: [PATCH 3/3] Update Microsoft.DotNet.Build.Tasks.TargetFramework.props --- .../build/Microsoft.DotNet.Build.Tasks.TargetFramework.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.props b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.props index 697ba047185..4964ab9c0d7 100644 --- a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.props +++ b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.props @@ -8,7 +8,7 @@ - ..\tools\netcoreapp3.1\Microsoft.DotNet.Build.Tasks.TargetFramework.dll - ..\tools\net472\Microsoft.DotNet.Build.Tasks.TargetFramework.dll + ..\tools\netcoreapp3.1\Microsoft.DotNet.Build.Tasks.TargetFramework.dll + ..\tools\net472\Microsoft.DotNet.Build.Tasks.TargetFramework.dll