Skip to content

Add Windows to nativeAOT template integration test#31250

Merged
StephaneDelcroix merged 4 commits intomainfrom
doti/nativeaot-test-windows
Sep 3, 2025
Merged

Add Windows to nativeAOT template integration test#31250
StephaneDelcroix merged 4 commits intomainfrom
doti/nativeaot-test-windows

Conversation

@morning4coffe-dev
Copy link
Copy Markdown
Contributor

@morning4coffe-dev morning4coffe-dev commented Aug 20, 2025

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Added integration test for Windows nativeAOT template in AOTTemplateTest.

Part of #31227

Copilot AI review requested due to automatic review settings August 20, 2025 07:55
@morning4coffe-dev morning4coffe-dev requested a review from a team as a code owner August 20, 2025 07:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Windows platform support to the existing nativeAOT template integration tests. The change enables testing of nativeAOT compilation for Windows applications alongside the existing iOS and macOS tests.

Key changes:

  • Added Windows test cases for both win-x64 and win-arm64 runtime identifiers
  • Implemented platform-specific build properties for Windows nativeAOT builds
  • Added platform detection logic to run tests only on appropriate host systems

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/BuildWarningsUtilities.cs Added Windows-specific expected warnings collection and reorganized public properties
src/TestUtils/src/Microsoft.Maui.IntegrationTests/AOTTemplateTest.cs Extended test cases to include Windows platforms and added Windows-specific build configuration

@simonrozsival
Copy link
Copy Markdown
Member

@morning4coffe-dev I believe we need to modify eng/pipelines/handlers.yml to actually run the AOT category of tests on Windows in CI.

Copy link
Copy Markdown
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a couple of errors passing the build AOT tests:

Failed PublishNativeAOTRootAllMauiAssemblies("maui","net9.0-windows10.0.19041.0","win-arm64") [4 s]
  Error Message:
     Project PublishNativeAO1380391994.csproj failed to build. Check test output/attachments for errors.
  Expected: True
  But was:  False

  Stack Trace:
     at Microsoft.Maui.IntegrationTests.AOTTemplateTest.PublishNativeAOTRootAllMauiAssemblies(String id, String framework, String runtimeIdentifier) in /_/src/TestUtils/src/Microsoft.Maui.IntegrationTests/AOTTemplateTest.cs:line 91
   at InvokeStub_AOTTemplateTest.PublishNativeAOTRootAllMauiAssemblies(Object, Span`1)

1)    at Microsoft.Maui.IntegrationTests.AOTTemplateTest.PublishNativeAOTRootAllMauiAssemblies(String id, String framework, String runtimeIdentifier) in /_/src/TestUtils/src/Microsoft.Maui.IntegrationTests/AOTTemplateTest.cs:line 91
   at InvokeStub_AOTTemplateTest.PublishNativeAOTRootAllMauiAssemblies(Object, Span`1)

Could you review it?

@morning4coffe-dev
Copy link
Copy Markdown
Contributor Author

@jsuarezruiz Thanks! Yeah, I am currently looking into those. I am wondering, if we are able to test the win-arm64 template with a x64 device? Or do you know if there are any limitations to that?

@StephaneDelcroix StephaneDelcroix merged commit 48cc70f into main Sep 3, 2025
129 checks passed
@StephaneDelcroix StephaneDelcroix deleted the doti/nativeaot-test-windows branch September 3, 2025 06:51
@github-actions github-actions bot locked and limited conversation to collaborators Oct 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants