Modern.Forms icon indicating copy to clipboard operation
Modern.Forms copied to clipboard

AOT Compiler

Open andyhebear opened this issue 8 months ago • 3 comments

Unhandled exception. System.TypeInitializationException: A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property. ---> System.TypeInitializationException: A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property. ---> System.TypeInitializationException: A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property. ---> System.TypeInitializationException: A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property. ---> System.DllNotFoundException: Unable to load DLL 'libSkiaSharp' or one of its dependencies: 找不到指定的模块。 at System.Runtime.InteropServices.NativeLibrary.LoadLibErrorTracker.Throw(String) + 0x50 at Internal.Runtime.CompilerHelpers.InteropHelpers.FixupModuleCell(InteropHelpers.ModuleFixupCell*) + 0x10e at Internal.Runtime.CompilerHelpers.InteropHelpers.ResolvePInvokeSlow(InteropHelpers.MethodFixupCell*) + 0x2f at SkiaSharp.SkiaApi.sk_typeface_ref_default() + 0x24 at SkiaSharp.SKTypeface..cctor() + 0x11 at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0xba --- End of inner exception stack trace --- at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x13c at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnNonGCStaticBase(StaticClassConstructionContext*, IntPtr) + 0xd at Modern.Forms.Theme..cctor() + 0x217 at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0xba --- End of inner exception stack trace --- at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x13c at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnNonGCStaticBase(StaticClassConstructionContext*, IntPtr) + 0xd at Modern.Forms.Control.<>c.<.cctor>b__441_0(ControlStyle style) + 0xcf at Modern.Forms.ControlStyle..ctor(ControlStyle parent, Action`1 setDefaults) + 0x85 at Modern.Forms.Control..cctor() + 0xab at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0xba --- End of inner exception stack trace --- at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x13c at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnGCStaticBase(StaticClassConstructionContext*, Object) + 0xd at Modern.Forms.Form..cctor() + 0x8a at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0xba --- End of inner exception stack trace --- at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x13c at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnGCStaticBase(StaticClassConstructionContext*, Object) + 0xd at Modern.Forms.Form..ctor() + 0x236 at ControlGallery.MainForm..ctor() + 0x12 at ControlGallery.Program.Main(String[] args) + 0x1c

andyhebear avatar May 06 '25 06:05 andyhebear

Image ok,I've already solved it。 But the enabling process is very slow

andyhebear avatar May 06 '25 06:05 andyhebear

Sometimes, the interface fails to display even after a long wait.

andyhebear avatar May 06 '25 06:05 andyhebear

use link.xml

< ? xml version="1.0" encoding="utf-8" ? > < linker > < assembly fullname="Modern.Forms" >

    < !--  添加其他动态使用的类型  -->
</ assembly >

< / linker >

andyhebear avatar May 06 '25 06:05 andyhebear