You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

.NET MAUI应用曾正常运行,现启动后崩溃及异常问题求助

.NET MAUI应用启动崩溃问题求助

我的.NET MAUI应用此前运行正常,一周前重新打开后出现崩溃问题。起初报‘circular dependancy’运行时错误,之后触发System.ArgumentNullException异常,现在应用启动后显示黑屏,数秒后直接崩溃且无任何错误提示。

此前捕获的System.ArgumentNullException异常信息如下:

System.ArgumentNullException: Value cannot be null. (Parameter 'key')
  at System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryInsert(String key, Object value, InsertionBehavior behavior)
  at System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Add(String key, Object value)
  at Registrar.DynamicRegistrar.SetAssemblyRegistered(String assembly)
  at ObjCRuntime.Class.Initialize(InitializationOptions* options)
  at ObjCRuntime.Runtime.Initialize(InitializationOptions* options)

已尝试的排查操作:

  • 重启电脑及测试环境
  • 重新下载安装Visual Studio
  • 注释掉Shell导航相关代码(怀疑错误与数据/对象传递有关),代码如下:
await Shell.Current.GoToAsync("/RecipeDetailsPage", true, new Dictionary<string, object>
{
    {"Recipe", recipe}
});

异常抛出时未指向我的任何业务文件。

内容的提问来源于stack exchange,提问作者Excal

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.20 02:45:02