Hey guys, I really want to know what I’m missing to crash on this code, looks it’s missing some dotNet libraries. Need to include some specific DLL on files? The error isn’t just about Color, but there’s another functions which includes from package System and crashes too.
private static Task EntityControllerHandler() {
Debug.WriteLine($"Color: {Color.Chartreuse}");
}
The error stack trace:
Exception thrown by a task: System.AggregateException: One or more errors occurred. ---> System.BadImageFormatException: Error verifying Saphirex.Example.Client.Modules.EntityManager:EntityControllerHandler (): Cannot load method from token 0x0a0000bc for call at 0x0167
at CitizenFX.Core.BaseScript+<>c__DisplayClass40_1.<ScheduleTick>b__1 () [0x00049] in C:\gl\builds\master\fivem\code\client\clrcore\BaseScript.cs:176
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in <4a74a468ceae4b8199f7400d96d8dff5>:0
at System.Threading.Tasks.Task.Execute () [0x00010] in <4a74a468ceae4b8199f7400d96d8dff5>:0
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.BadImageFormatException: Error verifying Saphirex.Example.Client.Modules.EntityManager:EntityControllerHandler (): Cannot load method from token 0x0a0000bc for call at 0x0167
at CitizenFX.Core.BaseScript+<>c__DisplayClass40_1.<ScheduleTick>b__1 () [0x00049] in C:\gl\builds\master\fivem\code\client\clrcore\BaseScript.cs:176
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in <4a74a468ceae4b8199f7400d96d8dff5>:0
at System.Threading.Tasks.Task.Execute () [0x00010] in <4a74a468ceae4b8199f7400d96d8dff5>:0 <---
Failed to run a tick for Core: System.BadImageFormatException: Error verifying Saphirex.Example.Client.Modules.EntityManager:EntityControllerHandler (): Cannot load method from token 0x0a0000bc for call at 0x0167
at CitizenFX.Core.BaseScript+<>c__DisplayClass40_1.<ScheduleTick>b__1 () [0x00049] in C:\gl\builds\master\fivem\code\client\clrcore\BaseScript.cs:176
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in <4a74a468ceae4b8199f7400d96d8dff5>:0
at System.Threading.Tasks.Task.Execute () [0x00010] in <4a74a468ceae4b8199f7400d96d8dff5>:0