Closed Vardan2009 closed 2 weeks ago
That means something isn't plugged. Could you show us the full output log so we can see which method needs to be plugged?
This is the part of the output since the error
1>IL2CPU : error : Exception: System.Exception: Native code encountered, plug required. Check build output for more information.
1> DO NOT REPORT THIS AS A BUG.
1> Please see http://www.gocosmos.org/docs/plugs/missing/
1> Need plug for: System.MulticastDelegate System.Delegate.InternalAllocLike(System.Delegate)(Plug Signature: System_MulticastDelegate__System_Delegate_InternalAllocLike_System_Delegate_ ).
1> Static: True
1> Assembly: System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
1> Called from:
1>System.MulticastDelegate::System.MulticastDelegate NewMulticastDelegate(System.Object[], Int32, Boolean)
1>System.MulticastDelegate::System.Delegate CombineImpl(System.Delegate)
1>System.Delegate::System.Delegate CombineImpl(System.Delegate)
1>
1>
1> at Cosmos.IL2CPU.ILScanner.ScanMethod(MethodBase aMethod, Boolean aIsPlug, String sourceItem) in C:\Users\user\Documents\GitHub\CosmosOS\IL2CPU\source\Cosmos.IL2CPU\ILScanner.cs:line 562
1> at Cosmos.IL2CPU.ILScanner.ScanQueue() in C:\Users\user\Documents\GitHub\CosmosOS\IL2CPU\source\Cosmos.IL2CPU\ILScanner.cs:line 751
1> at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod, IEnumerable`1 plugsAssemblies) in C:\Users\user\Documents\GitHub\CosmosOS\IL2CPU\source\Cosmos.IL2CPU\ILScanner.cs:line 270
1> at Cosmos.IL2CPU.CompilerEngine.Execute() in C:\Users\user\Documents\GitHub\CosmosOS\IL2CPU\source\Cosmos.IL2CPU\CompilerEngine.cs:line 187
1>IL2CPU task took 00:00:03.1548308
Sorry @gamma63 , EventHandler is not working as bug of IL2CPU. (Bug of MulticastDelegate Plugs)
You need to use List
Bit late, but this indeed is a bug and is tracked in #2765.
Area of Cosmos - What area of Cosmos are we dealing with?
Events
Expected Behaviour - What do you think that should happen?
Be able to subscribe to a custom event
Actual Behaviour - What unexpectedly happens?
The compilation fails with the following message
Exception: System.Exception: Native code encountered, plug required. Chech build output for more information
I assume this means that Cosmos is missing a plug for Event Handling, but I thought Cosmos had an implementation for that?Reproduction - How did you get this error to appear?
Create custom event args
Create an event in another class
Try to subscribe to the event from other class
Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?
Latest DevKit with C#