Can not implicitly convert a unityEngine.GameObject from unityEngine.Coremodule.dll to unityEngine.GameObject from Unityengine.dll

hi, i am trying to make a .dll library in visual studio which i will later use in unity, i am making the library project as i will need to upload it as AssetBundle,
currentWorkingBlock = currentWorkingTexDraw.gameObject;
this line workes perfectly in unity project but when i am making the visual studio dll file this line gives the error :
Can not implicitly convert a UnityEngine.GameObject from UnityEngine.CoreModule.dll to UnityEngine.GameObject from UnityEngine.dll

can anybody tell me how unity is converting it internally,
or any other way through which i can download assets and scripts from the server into the apk at runtime and build the scene?
currentWorkingTexDraw is a texDraw object, texDraw is an asset that we bought for representing mathematical values.

You referenced the wrong assemblie(s) in your VS project. I haven’t build my own assembly for Unity manually in the last years. Unity has not split it’s core into several modules. So I’m not sure which one you should reference. For example for Unity version “2019.3.0f6” there is a combined UnityEngine.dll file at

"C:\Program Files\Unity\Hub\Editor\2019.3.0f6\Editor\Data\Managed"

But there’s also the subfolder UnityEngine inside that folder which contains all the seperate modules:

"C:\Program Files\Unity\Hub\Editor\2019.3.0f6\Editor\Data\Managed\UnityEngine\"

As you can read in the documentation the GameObject class is now defined inside the module “UnityEngine.CoreModule.dll”. Keep in mind that the namespace in which a class is defined has nothing to do with where the class is physically located (i.e. in which assembly / DLL file it is defined). You seem to reference two seperate assemblies which both implement the UnityEngine.GameObject class. since they reside in different assemblies they are not compatible with each other.