System.TypeLoadException: Could not resolve type with token 01000004 from typeref (expected class 'System.Reflection.AssemblyInformationalVersionAttribute' in assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')

Satya 160 Reputation points
2024-02-26T16:05:29.36+00:00

MAUI android app is crashing randomly and i am not able to find the root cause of it. Can anyone please help me on this by seeing the below crash log from appcenter.

Thanks in advance

System.TypeLoadException: Could not resolve type with token 01000004 from typeref (expected class 'System.Reflection.AssemblyInformationalVersionAttribute' in assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089') at System.Reflection.CustomAttribute.GetCustomAttributesBase(ICustomAttributeProvider , Type , Boolean ) at System.Reflection.CustomAttribute.GetCustomAttributes(ICustomAttributeProvider , Type , Boolean ) at System.Reflection.RuntimeAssembly.GetCustomAttributes(Type , Boolean ) at Microsoft.Maui.Platform.ReflectionExtensions.GetCustomAttributesSafe(Assembly assembly, Type attrType) at Microsoft.Maui.Controls.Internals.Registrar.RegisterAll(Assembly[] assemblies, Assembly defaultRendererAssembly, Type[] attrTypes, InitializationFlags flags, Action1 viewRegistered, IFontRegistrar fontRegistrar) at Microsoft.Maui.Controls.Internals.Registrar.RegisterAll(Type[] attrTypes, InitializationFlags flags, IFontRegistrar fontRegistrar) at Microsoft.Maui.Controls.Internals.Registrar.RegisterAll(Type[] attrTypes, IFontRegistrar fontRegistrar) at Microsoft.Maui.Controls.Compatibility.Forms.RegisterCompatRenderers(IMauiContext , Nullable1 ) at Microsoft.Maui.Controls.Compatibility.Forms.SetupInit(IMauiContext , Assembly , Nullable1 ) at Microsoft.Maui.Controls.Compatibility.Forms.Init(IMauiContext , Nullable1 ) at Microsoft.Maui.Controls.Compatibility.Forms.Init(IActivationState , Nullable1 ) at Microsoft.Maui.Controls.Compatibility.Hosting.AppHostBuilderExtensions.<>c.<OnConfigureLifeCycle>b__1_1(IMauiContext ) at Microsoft.Maui.Platform.ApplicationExtensions.<>c__DisplayClass1_0.<CreatePlatformWindow>b__0(OnMauiContextCreated del) at Microsoft.Maui.LifecycleEvents.LifecycleEventServiceExtensions.InvokeLifecycleEvents[OnMauiContextCreated](IServiceProvider services, Action1 action) at Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(Activity activity, IApplication application, Bundle savedInstanceState) at Microsoft.Maui.MauiAppCompatActivity.OnCreate(Bundle savedInstanceState) at TLM.NextGenMobileApp.MainActivity.OnCreate(Bundle savedInstanceState) at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_(IntPtr , IntPtr , IntPtr ) at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V(_JniMarshal_PPL_V , IntPtr , IntPtr , IntPtr )

Developer technologies | .NET | .NET MAUI
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.