Repository navigation
Labels
Mac CatalystIssues affecting Mac CatalystbugIf an issue is a bug or a pull request a bug fixmacOSIssues affecting macOS
Milestone
Description
This was tested using .NET 11 Preview 5.
dotnet new maui
dotnet watch -> select net11.0-maccatalyst
On mono it fails with:
=================================================================
Native Crash Reporting
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
=================================================================
Native stacktrace:
=================================================================
0x100748150 - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : mono_dump_native_crash_info
0x1006ff620 - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : mono_handle_native_crash
0x1008de844 - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : sigabrt_signal_handler.cold.1
0x100747a14 - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : mono_runtime_setup_stat_profiler
0x1854e3744 - /usr/lib/system/libsystem_platform.dylib : _sigtramp
0x1854d98d8 - /usr/lib/system/libsystem_pthread.dylib : pthread_kill
0x1853e0644 - /usr/lib/system/libsystem_c.dylib : abort
0x1004e0e78 - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : xamarin_register_assembly
0x1004e12b0 - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : xamarin_print_all_exceptions_wrapper
0x1004e4388 - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : xamarin_print_all_exceptions
0x1004e4a4c - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : xamarin_unhandled_exception_handler
0x100600424 - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : mono_invoke_unhandled_exception_hook
0x1006ff4bc - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : mono_handle_exception_internal
0x1006fdb20 - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : mono_handle_exception
0x100744734 - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : mono_arm_throw_exception
0x1004b057c - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : throw_exception
0x1006491e8 - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : mono_runtime_run_startup_hooks
0x100697888 - /Users/<user>/repro/maui/mp5debug/bin/Debug/net11.0-maccatalyst/maccatalyst-arm64/mp5debug.app/Contents/MacOS/mp5debug : mini_init
On CoreCLR it fails with:
Unhandled exception. System.ArgumentException: Startup hook assembly '/Users/<user>/.dotnet.install/11.0.P5/sdk/11.0.100-preview.5.26302.115/DotnetTools/dotnet-watch/11.0.100-preview.5.26302.115/tools/net11.0/any/hotreload/net10.0/Microsoft.Extensions.DotNetDeltaApplier.dll' failed to load. See inner exception for details.
---> System.IO.FileLoadException: Could not load file or assembly '/Users/<user>/.dotnet.install/11.0.P5/sdk/11.0.100-preview.5.26302.115/DotnetTools/dotnet-watch/11.0.100-preview.5.26302.115/tools/net11.0/any/hotreload/net10.0/Microsoft.Extensions.DotNetDeltaApplier.dll'. Access is denied.
File name: '/Users/<user>/.dotnet.install/11.0.P5/sdk/11.0.100-preview.5.26302.115/DotnetTools/dotnet-watch/11.0.100-preview.5.26302.115/tools/net11.0/any/hotreload/net10.0/Microsoft.Extensions.DotNetDeltaApplier.dll'
at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyBinder, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at System.StartupHookProvider.CallStartupHook(StartupHookNameOrPath startupHook)
--- End of inner exception stack trace ---
at System.StartupHookProvider.CallStartupHook(StartupHookNameOrPath startupHook)
at System.StartupHookProvider.ProcessStartupHooks(String diagnosticStartupHooks)
at System.StartupHookProvider.ManagedStartup(Char* pDiagnosticStartupHooks, Exception* pException)
This only happens on maccatalyst - using iOS simulator works.
Metadata
Metadata
Assignees
Labels
Mac CatalystIssues affecting Mac CatalystbugIf an issue is a bug or a pull request a bug fixmacOSIssues affecting macOS
Activity
rolfbjarne commentedon Jun 16, 2026
This is because the Mac Catalyst app is in sandbox mode (the default). Disabling sandbox mode (in Platforms/MacCatalyst/Entitlements.plist) gets passed this, and then another error shows up, which is due to the trimmer being enabled (already filed here: #25295). If that's fixed too (by setting
MtouchLink=Nonein the csproj),dotnet watchworks for me.Disabling the linker also makes it work when using Mono, so I'll leave this issue for the sandbox problem.
[-]dotnet watch fails when targeting maccatalyst[/-][+]dotnet watch fails when targeting sandboxed maccatalyst apps[/+]rolfbjarne commentedon Jun 16, 2026
Presumably the sandbox problem also exists for macOS apps, the difference is that the sandbox isn't enabled by default for macOS apps.
rolfbjarne commentedon Jun 16, 2026
The fix might actually be related to the fix for #25408, because the fix for both would be to:
Note that the sandbox isn't enforced for simulator apps, which is why this is not needed there.
[dotnet] Fix 'dotnet watch' with sandboxed Mac Catalyst apps (#25738)
rolfbjarne commentedon Jul 1, 2026
This is fixed now (for P7).