Skip to content

Add the openharmony RIDs and skip repo-side NativeAOT for openharmony - #69952

Merged
akoeplinger merged 6 commits into
dotnet:mainfrom
springmin:pr/ohos-aspnet-rids-rebuild
Nov 9, 2026
Merged

akoeplinger merged 6 commits into
dotnet:mainfrom
springmin:pr/ohos-aspnet-rids-rebuild

Conversation

@springmin

Copy link
Copy Markdown
Contributor

Summary

Add openharmony-arm64/openharmony-x64 to the shared-framework supported
RIDs, the explicit runtime/crossgen2 package list, and the bundled-tool RIDs.
Skip repo-side NativeAOT for openharmony: the repository's bundled tools and
E2E AOT harnesses do not have the OpenHarmony cross-AOT toolchain wired up.
This does not affect user AOT publishing, which uses the runtime ILCompiler
pack.

Changes

  • Directory.Build.props: add the two openharmony RIDs to
    SupportedRuntimeIdentifiers, and set NativeAotSupported=false when the
    target OS or runtime identifier is openharmony (repo-side tools and E2E
    harnesses only).
  • Directory.Packages.props: add Microsoft.NETCore.App.Runtime.openharmony-*
    and Microsoft.NETCore.App.Crossgen2.openharmony-* to the explicit runtime
    package list.
  • src/Tools/Directory.Build.props: add the openharmony RIDs to
    BundledToolTargetRuntimeIdentifiers.
  • src/Components/Testing/testassets/NativeAotTestApp/NativeAotTestApp.csproj
    and .../PackageConsumer/App/PackageConsumer.App.csproj: skip PublishAot
    for openharmony in the E2E AOT harnesses.
  • Five files, 17 insertions and 4 deletions.

Impact

  • OpenHarmony only; other platforms keep their RID lists and NativeAOT setup.
  • The shared framework is produced with crossgen2 and is unchanged. NativeAOT
    is skipped only for the repository's own tools and E2E harnesses; user AOT
    publishing is served by the runtime ILCompiler pack.
  • The RIDs come from the runtime RID graph added in Add OpenHarmony/HarmonyOS build infrastructure runtime#132953.

Follow-up

Repo-side AOT for openharmony can be enabled once the runtime ILCompiler pack
for the pinned version and the OpenHarmony cross-AOT toolchain (NDK/lld, see
the prereqs image discussion) are available to the build.

Test

  1. Build for openharmony-arm64: the shared framework and bundled tools
    resolve the openharmony RIDs; repo-side NativeAOT is not attempted.
  2. The E2E AOT harnesses skip PublishAot on openharmony.
  3. CI runs the regular build/test legs for the change.

Note

This PR was authored with AI assistance (agent tooling) under the author's direction.

@springmin
springmin requested a review from a team as a code owner October 21, 2026 02:15
@github-actions github-actions Bot added area-blazor Includes: Blazor, Razor Components area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework labels Oct 21, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Oct 21, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Thanks for your PR, @springmin. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hey @dotnet/aspnet-build, looks like this PR is something you want to take a look at.

Comment thread Directory.Build.props Resolved
@springmin

Copy link
Copy Markdown
Contributor Author

Thanks @akoeplinger. The root fix is in dotnet/arcade#17723 (NativeAotSupported.props now rejects openharmony). I kept the root override temporarily so the OHOS build still works until the Arcade change flows; it is marked with the PR link and will be removed in a follow-up.

For the test assets, I imported NativeAotSupported.props in src/Components/Testing/testassets/Directory.Build.props, switched both PublishAot conditions to $(NativeAotSupported), and set ExcludeFromBuild on NativeAotTestApp.E2E.Tests when NativeAOT is not supported.

Note

This comment was drafted with AI assistance (agent tooling) under the author's direction.

@springmin

Copy link
Copy Markdown
Contributor Author

@akoeplinger added ExcludeFromBuild to NativeAotTestApp when NativeAotSupported is false. For PackageConsumer.App, I gated the exclusion on E2ECompileTestHarness == 'true' instead of excluding it unconditionally: the app is also published by the non-AOT package consumer tests, so only the AOT harness variant is skipped.

Note

This comment was drafted with AI assistance (agent tooling) under the author's direction.

@springmin
springmin force-pushed the pr/ohos-aspnet-rids-rebuild branch from a7de88c to d25a59d Compare October 29, 2026 01:23
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@dotnet-policy-service dotnet-policy-service Bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Nov 5, 2026
@springmin

Copy link
Copy Markdown
Contributor Author

Status update after re-checking the current CI and dependency flow:

  • dotnet/arcade#17723 is merged, but this branch's vendored
    eng/common/native/NativeAotSupported.props still does not contain the
    openharmony exclusion. I kept the temporary NativeAotSupported=false
    override in Directory.Build.props until that Arcade change flows into
    eng/common; I will remove it in a follow-up rebase. I am not editing
    eng/common manually.
  • The test assets now use NativeAotSupported and ExcludeFromBuild.
    PackageConsumer.App is excluded only when
    E2ECompileTestHarness == true, so the non-AOT package tests still build it.

The current red checks are:

  • IIS.FunctionalTests--net12.0: ANCM out-of-process startup failure
    (failed to bind to port '0', HTTP 502.5), an IIS test-environment flake.
  • aspnetcore-components-e2e: one Selenium/Blazor test failure in each leg
    (Node with given id does not belong to the document, and a navigation-scroll
    assertion), unrelated to the RID/NativeAOT changes.
  • Build Analysis / Build Insights are downstream of those jobs.

Could @akoeplinger or @dotnet/aspnet-build rerun aspnetcore-ci and
aspnetcore-components-e2e? The PR already has the pending-ci-rerun label.
I cannot trigger /azp run from this account.

Note

This comment was drafted with AI assistance (agent tooling) under the author's direction.

springmin and others added 6 commits November 6, 2026 23:26
- Directory.Build.props: add openharmony-x64/arm64 to the shared-framework
  supported RIDs, and set NativeAotSupported=false for openharmony: the repo's
  bundled tools and E2E AOT harnesses do not have the OpenHarmony cross-AOT
  toolchain wired up. This does not affect user AOT publishing, which uses the
  runtime ILCompiler pack.
- Directory.Packages.props: add the openharmony runtime and crossgen2 packages
  to the explicit runtime package list.
- src/Tools/Directory.Build.props: add the openharmony RIDs to the bundled
  tool RIDs.
- The E2E NativeAOT harnesses skip PublishAot for openharmony.
Import NativeAotSupported.props in the testassets Directory.Build.props,
gate the E2E PublishAot on the property, and skip the NativeAOT E2E test
project when the target does not support NativeAOT.

The root override remains temporary until dotnet/arcade#17723 flows.
@springmin

Copy link
Copy Markdown
Contributor Author

@akoeplinger friendly ping — I rebased the branch onto current main (0328421361) and removed the temporary NativeAotSupported override from the root Directory.Build.props now that the vendored eng/common/native/NativeAotSupported.props includes the OpenHarmony exclusion.

The AOT test assets still import the property and use ExcludeFromBuild as discussed. PackageConsumer.App remains excluded only for the E2E harness (E2ECompileTestHarness == 'true'), so the non-AOT package tests still build it.

The latest CI run has 31 passing checks and 0 failures, including IIS and the Blazor E2E legs. I also replied to the five review threads. Could you take a fresh look and resolve the threads if the current code looks good?

Thanks!

@akoeplinger
akoeplinger merged commit 016ec3b into dotnet:main Nov 9, 2026
32 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework community-contribution Indicates that the PR has been added by a community member pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants