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
dotnet-watch requires MtouchLink=None for iOS Simulator projects #25295
We should consider making MtouchLink=None the default for Debug iPhone Simulator builds, since linking is not typically needed in that configuration and it blocks dotnet watch from working.
This would improve the inner development loop experience without affecting Release or device builds.
Trimming is disabled for simulator builds only if the interpreter is enabled (otherwise the build takes forever), which IIRC is the default for MAUI builds (and Hot Reload doesn't work anyway unless the interpreter is enabled I believe),
<_DefaultLinkModeCondition="'$(_DefaultLinkMode)' == '' And '$(_SdkIsSimulator)' == 'true' And (!$(RuntimeIdentifier.Contains('arm64')) Or '$(MtouchInterpreter)' != '')">None</_DefaultLinkMode>
Exactly which build configuration did you use? Was this just a 'dotnet new ios' or something else? Would you happen to have a binlog?
Hi @jonathanpeppers. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Sorry, it was a dotnet new maui project (.NET 11 Preview 4 builds), and if I don't set this property I get this exception in the startup hook:
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.MissingMethodException: Method not found: 'System.String[] System.Environment.GetCommandLineArgs()'.
at StartupHook.Initialize()
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
--- End of inner exception stack trace ---
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.StartupHookProvider.CallStartupHook(StartupHookNameOrPath startupHook)
at System.StartupHookProvider.ProcessStartupHooks(String diagnosticStartupHooks)
at System.StartupHookProvider.ManagedStartup(Char* pDiagnosticStartupHooks, Exception* pException)
Confusing, but related, I found these lines in dotnet/maui:
Hi @jonathanpeppers. Due to inactivity, we will be closing this issue. Please feel free to re-open this issue if the issue persists. For enhanced visibility, if over 7 days have passed, please open a new issue and link this issue there. Thank you.
Activity
rolfbjarne commentedon May 4, 2026
Trimming is disabled for simulator builds only if the interpreter is enabled (otherwise the build takes forever), which IIRC is the default for MAUI builds (and Hot Reload doesn't work anyway unless the interpreter is enabled I believe),
macios/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props
Line 68 in 3619b81
Exactly which build configuration did you use? Was this just a 'dotnet new ios' or something else? Would you happen to have a binlog?
dotnet-policy-service commentedon May 4, 2026
Hi @jonathanpeppers. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
jonathanpeppers commentedon May 4, 2026
jonathanpeppers commentedon May 4, 2026
Sorry, it was a
dotnet new mauiproject (.NET 11 Preview 4 builds), and if I don't set this property I get this exception in the startup hook:Confusing, but related, I found these lines in dotnet/maui:
jonathanpeppers commentedon May 4, 2026
Oh, I forgot a
.binlog:Archive.zip
rolfbjarne commentedon May 5, 2026
So MAUI does this:
It's turning on the trimmer when using CoreCLR.
This was implemented here: dotnet/maui#34107
rolfbjarne commentedon May 5, 2026
I think this needs a change in MAUI as well.
[dotnet] Disable trimming when using CoreCLR in the simulator. (dotne…
dotnet-policy-service commentedon May 13, 2026
Hi @jonathanpeppers. Due to inactivity, we will be closing this issue. Please feel free to re-open this issue if the issue persists. For enhanced visibility, if over 7 days have passed, please open a new issue and link this issue there. Thank you.
Don't change the default trimming for iOS and Mac Catalyst when using…
rolfbjarne commentedon Jul 16, 2026
"dotnet watch" works from a plain "dotnet new maui" solution when targeting an iOS simulator in P6 now, no changes needed, so this is fixed.