From cd2f0ffb287251c26f03850d1a596abafb99d5c7 Mon Sep 17 00:00:00 2001 From: Tom Deseyn Date: Tue, 27 Sep 2022 13:22:50 +0200 Subject: [PATCH] Use generated runtime.json when building shared framework packages. (#76068) * Use generated runtime.json when building shared framework packages. * Don't UpdateRuntimeJson on Build. * PR feedback. * Update Microsoft.NETCore.Platforms.csproj Co-authored-by: Viktor Hofer --- Directory.Build.props | 1 - eng/liveBuilds.targets | 4 +++- .../src/Microsoft.NETCore.Platforms.csproj | 7 +++---- src/libraries/oob-all.proj | 3 +-- src/libraries/oob-src.proj | 3 +-- src/libraries/pretest.proj | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 6bdf6ba2f204f..3e76022487983 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -274,7 +274,6 @@ https://dot.net microsoft,dotnetframework true - $([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'Microsoft.NETCore.Platforms', 'src', 'runtime.json')) $(MSBuildThisFileDirectory)LICENSE.TXT MIT false diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets index 982413a4ebae2..3006fd92e756e 100644 --- a/eng/liveBuilds.targets +++ b/eng/liveBuilds.targets @@ -223,6 +223,8 @@ ResolveLibrariesRuntimeFilesFromLocalBuild" /> - $(RuntimeIdGraphDefinitionFile) + + $([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'Microsoft.NETCore.Platforms', 'runtime.json')) + $([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'Microsoft.NETCore.Platforms', 'src', 'runtime.json')) diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj b/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj index 482e0b70e47e7..742f17881891c 100644 --- a/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj +++ b/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj @@ -17,7 +17,6 @@ true $(MSBuildProjectName) - GenerateRuntimeJson;UpdateRuntimeJson;$(BeforePack) <_generateRuntimeGraphTargetFramework Condition="'$(MSBuildRuntimeType)' == 'core'">$(NetCoreAppToolCurrent) <_generateRuntimeGraphTargetFramework Condition="'$(MSBuildRuntimeType)' != 'core'">net472 @@ -44,7 +43,7 @@ - + @@ -58,12 +57,12 @@ - + diff --git a/src/libraries/oob-all.proj b/src/libraries/oob-all.proj index f84c5b4050251..9164a5846ceb4 100644 --- a/src/libraries/oob-all.proj +++ b/src/libraries/oob-all.proj @@ -16,8 +16,7 @@ diff --git a/src/libraries/oob-src.proj b/src/libraries/oob-src.proj index 2cbfdf9bb3c55..472a2dfb5e708 100644 --- a/src/libraries/oob-src.proj +++ b/src/libraries/oob-src.proj @@ -21,8 +21,7 @@ ('$(BuildAllConfigurations)' != 'true' and '$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)')" /> - +