From 5e2453988f460897ce08d5c10f34b4a8b882b7cb Mon Sep 17 00:00:00 2001 From: Jackson Schuster <36744439+jtschuster@users.noreply.github.com> Date: Fri, 12 Jan 2024 09:22:47 -0800 Subject: [PATCH] Add non-portable RID to list of known runtime packs instead of overwriting in source-build (#96858) In https://github.com/dotnet/runtime/pull/75597, for source-build we replace all the RIDs with only the `PackageRID` in the `KnownFrameworkReference` for `NetCurrent` when we should have only added an additional RID. This was causing issues in crossbuilds of vertical builds. The crossgen and ilc projects that run within the build require a runtime for the build machine's RID, but it wasn't found in `KnownFrameworkReference` and the build failed during restore. Part of reenabling Crossgen and ILC in arm64 crossbuild verticals https://github.com/dotnet/source-build/issues/3698 --- Directory.Build.targets | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index c4c006eb266d5..336051f191a4b 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -22,11 +22,13 @@ for Microsoft.NETCore.App.Runtime. and Microsoft.NETCore.App.Crossgen2.. --> - - $(PackageRID) + + %(RuntimePackRuntimeIdentifiers);$(PackageRID) - - $(PackageRID) + + %(Crossgen2RuntimeIdentifiers);$(PackageRID)