Found no issue template in source so report here.
There’s a mismatch between CitizenFX.Core.System.Drawing and default System.Drawing.
When using System.Drawing (using System.Drawing in code), It seems calling from System.Drawing in CitizenFX.Core.dll indeed.
However, we can’t use namespace System.Drawing in CitizenFX.Core.dll in code. Only the way to use it is to reference System.Drawing.dll from .net standard library path.
When using System.Drawing.Color in code:
- if sets reference path to client\citizen\clr2\lib\mono\4.5, source code won’t compile because System.Drawing.dll is an empty dll file in reference path.
- if set reference path to Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\ (which is default), it will compile. And in runtime, it seems calling from System.Drawing in CitizenFX.Core.dll indeed.
(CitizenFX.Core.dll has its own System.Drawing namespce)- AFAIK, there’s no way to use namespace System.Drawing in CitizenFX.Core.dll. We cannot write some code like CitizenFX.Core.System.Drawing.Color.Fromrgba and etc.
- Because class Color is not defined in System.Drawing.dll in fivem lib, we can’t refere this from Fivem library path, but from .Net standard lib.
- Since client picks its runtime environment from citizen\clr2\lib, we should use fivem client library as standard reference library path, instead of Microsoft .Net path.