You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Apple mobile][NativeAOT] Construct the test publish folder instead of stripping extensions in AppleAppBuilder #130399
On Apple mobile NativeAOT the app bundler strips a fixed set of file extensions from the .app bundle in src/tasks/AppleAppBuilder/Xcode.cs (lines 276 to 284). The stripped extensions are .dll, .pdb, .deps.json, .runtimeconfig.json, .bin and .dSYM. As a result, any test Content file with one of those extensions reaches publish/ but never lands in the app working directory, so tests that read such a file by path fail with FileNotFoundException. The common workaround so far has been to disable those tests.
Root cause
The blanket extension filter exists because the NativeAOT publish folder still contains managed assemblies that are already compiled into the native image and should not be bundled. The bundler cannot tell those apart from test data that shares the same extension, so it excludes by extension. The TODO right above the exclusion list already calls this out:
// TODO: All of these exclusions shouldn't be needed once we carefully construct the publish folder on Helix
Proposed fix
Construct the publish or bundle folder so it contains exactly what should ship, instead of excluding by extension. This removes the whole class of "new test with Content fails on Apple NativeAOT" failures and lets us drop the per-test workarounds.
Impact and examples
System.Diagnostics.FileVersionInfo.Tests.FileVersionInfo_CustomManagedAssembly failed because System.Diagnostics.FileVersionInfo.TestAssembly.dll was stripped. Worked around in [mobile] Disable NativeAOT-specific test failures on Apple mobile #130168 by embedding the assembly as a managed resource and writing it to a temp file at run time.
Activity
dotnet-policy-service commentedon Jul 9, 2026
Tagging subscribers to 'os-ios': @vitek-karas, @kotlarmilos, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon Jul 9, 2026
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.
MihuBot commentedon Jul 9, 2026
I'm a bot. Here is a possible related and/or duplicate issue (I may be wrong):