From 4e92a776a0bb0b8a4ab02ad4e436352594b7eab2 Mon Sep 17 00:00:00 2001 From: Tom Deseyn Date: Tue, 13 Sep 2022 10:51:19 +0200 Subject: [PATCH 1/3] source-build: support building aspnetcore using non-portable runtime packages. Currently source-build performs 'runtime-portable' build that produces 'linux-{arch}' packages that are used when building ASP.NET Core. With this change, we can use the non-portable packages that are produced by the source-build 'runtime' build, and eliminate the 'runtime-portable' build. --- Directory.Build.props | 2 ++ eng/Common.props | 2 ++ eng/Dependencies.props | 2 ++ .../GenerateFiles/Directory.Build.targets.in | 9 +++++++++ .../Driver/Wasm.Performance.Driver.csproj | 2 +- .../src/Microsoft.AspNetCore.App.Runtime.csproj | 15 ++++++++------- src/Tools/Directory.Build.targets | 2 +- 7 files changed, 25 insertions(+), 9 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 7de4b0494281..3f560d43346e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -174,6 +174,8 @@ freebsd-x64 + $(SupportedRuntimeIdentifiers);$(TargetRuntimeIdentifier) + false true diff --git a/eng/Common.props b/eng/Common.props index a9a69bde9f22..d12f15da7917 100644 --- a/eng/Common.props +++ b/eng/Common.props @@ -6,6 +6,8 @@ freebsd x64 $(TargetOsName)-$(TargetArchitecture) + true + $(TargetRuntimeIdentifier) diff --git a/eng/Dependencies.props b/eng/Dependencies.props index c1b35e485328..adaecbb64c21 100644 --- a/eng/Dependencies.props +++ b/eng/Dependencies.props @@ -106,6 +106,7 @@ and are generated based on the last package release. + @@ -121,6 +122,7 @@ and are generated based on the last package release. + diff --git a/eng/tools/GenerateFiles/Directory.Build.targets.in b/eng/tools/GenerateFiles/Directory.Build.targets.in index 1af2667cb4b4..0100971de43d 100644 --- a/eng/tools/GenerateFiles/Directory.Build.targets.in +++ b/eng/tools/GenerateFiles/Directory.Build.targets.in @@ -56,18 +56,27 @@ ${MicrosoftNETCoreAppRuntimeVersion} + $(TargetRuntimeIdentifier) ${MicrosoftNETCoreAppRuntimeVersion} + $(TargetRuntimeIdentifier) ${MicrosoftNETCoreAppRuntimeVersion} + $(TargetRuntimeIdentifier) + + ${MicrosoftNETCoreAppRuntimeVersion} + $(TargetRuntimeIdentifier) + + false true - linux-x64 + linux-x64 annotations diff --git a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj index c0627880378c..c3f0b449e5b0 100644 --- a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj +++ b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj @@ -96,18 +96,19 @@ This package is an internal implementation of the .NET Core SDK and is not meant $(Crossgen2ToolFileName).exe - PkgMicrosoft_NETCore_App_Runtime_$(RuntimeIdentifier) + PkgMicrosoft_NETCore_App_Runtime_$(RuntimeIdentifier.Replace('.', '_')) - $(TargetOsName) - linux - x64 + $(TargetOsName) + linux + $(TargetRuntimeIdentifier.Substring(0,$(TargetRuntimeIdentifier.IndexOf('-')))) + x64 $(BuildArchitecture) - PkgMicrosoft_NETCore_App_Crossgen2_$(BuildOsName)-$(Crossgen2BuildArchitecture) + PkgMicrosoft_NETCore_App_Crossgen2_$(Crossgen2OsName.Replace('.', '_'))-$(Crossgen2BuildArchitecture) $(AssetTargetFallback);native,Version=0.0 @@ -138,7 +139,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant $(GeneratePathProperty) and hacks in the _ExpandRuntimePackageRoot target work around the gaps. --> @@ -444,7 +445,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant $(TargetOsName) windows diff --git a/src/Tools/Directory.Build.targets b/src/Tools/Directory.Build.targets index 854f90ab5c20..438ea3da045d 100644 --- a/src/Tools/Directory.Build.targets +++ b/src/Tools/Directory.Build.targets @@ -1,7 +1,7 @@ - win-x64;win-x86 + win-x64;win-x86 false false diff --git a/eng/Common.props b/eng/Common.props index d12f15da7917..3dcca1c6b54d 100644 --- a/eng/Common.props +++ b/eng/Common.props @@ -7,7 +7,7 @@ x64 $(TargetOsName)-$(TargetArchitecture) true - $(TargetRuntimeIdentifier) + $(TargetRuntimeIdentifier) diff --git a/eng/Dependencies.props b/eng/Dependencies.props index adaecbb64c21..0d47cc0a111b 100644 --- a/eng/Dependencies.props +++ b/eng/Dependencies.props @@ -106,7 +106,7 @@ and are generated based on the last package release. - + @@ -122,7 +122,7 @@ and are generated based on the last package release. - + diff --git a/eng/tools/GenerateFiles/Directory.Build.targets.in b/eng/tools/GenerateFiles/Directory.Build.targets.in index 0100971de43d..e97a6485d5b9 100644 --- a/eng/tools/GenerateFiles/Directory.Build.targets.in +++ b/eng/tools/GenerateFiles/Directory.Build.targets.in @@ -56,22 +56,22 @@ ${MicrosoftNETCoreAppRuntimeVersion} - $(TargetRuntimeIdentifier) + $(TargetRuntimeIdentifier) ${MicrosoftNETCoreAppRuntimeVersion} - $(TargetRuntimeIdentifier) + $(TargetRuntimeIdentifier) ${MicrosoftNETCoreAppRuntimeVersion} - $(TargetRuntimeIdentifier) + $(TargetRuntimeIdentifier) - + ${MicrosoftNETCoreAppRuntimeVersion} $(TargetRuntimeIdentifier) diff --git a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj index c3f0b449e5b0..b8319a82a1bf 100644 --- a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj +++ b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj @@ -105,7 +105,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant --> $(TargetOsName) linux - $(TargetRuntimeIdentifier.Substring(0,$(TargetRuntimeIdentifier.IndexOf('-')))) + $(TargetRuntimeIdentifier.Substring(0,$(TargetRuntimeIdentifier.IndexOf('-')))) x64 $(BuildArchitecture) PkgMicrosoft_NETCore_App_Crossgen2_$(Crossgen2OsName.Replace('.', '_'))-$(Crossgen2BuildArchitecture) From e4bbdd0d0fb248861e6747e83986cbafea786e98 Mon Sep 17 00:00:00 2001 From: Tom Deseyn Date: Thu, 15 Sep 2022 11:07:17 +0200 Subject: [PATCH 3/3] Revert name change. --- .../src/Microsoft.AspNetCore.App.Runtime.csproj | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj index b8319a82a1bf..c8074844dcfa 100644 --- a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj +++ b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj @@ -103,12 +103,12 @@ This package is an internal implementation of the .NET Core SDK and is not meant are built on an Ubuntu container with cross compilation tools. linux-musl-x64 is built in an alpine container. Special case the crossgen2 package reference on Windows to avoid the x86 package when building in Visual Studio. --> - $(TargetOsName) - linux - $(TargetRuntimeIdentifier.Substring(0,$(TargetRuntimeIdentifier.IndexOf('-')))) - x64 + $(TargetOsName) + linux + $(TargetRuntimeIdentifier.Substring(0,$(TargetRuntimeIdentifier.IndexOf('-')))) + x64 $(BuildArchitecture) - PkgMicrosoft_NETCore_App_Crossgen2_$(Crossgen2OsName.Replace('.', '_'))-$(Crossgen2BuildArchitecture) + PkgMicrosoft_NETCore_App_Crossgen2_$(BuildOsName.Replace('.', '_'))-$(Crossgen2BuildArchitecture) $(AssetTargetFallback);native,Version=0.0 @@ -139,7 +139,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant $(GeneratePathProperty) and hacks in the _ExpandRuntimePackageRoot target work around the gaps. --> @@ -445,7 +445,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant $(TargetOsName) windows