plugin reference

My unity plugin is throwing the following error message:

...is defined in an assembly that is not referenced. You must add a reference to assembly 'UnityEngine.CoreModule,

I’ve copied the UnityEngine.CoreModule.dll into the folder and added it as a reference. However it then kicks back with the following:

script.cs(59, 16): [CS0433] The type ‘Sprite’ exists in both ‘UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’ and ‘UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’

script2.cs(9, 34): [CS0433] The type ‘MonoBehaviour’ exists in both ‘UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’ and ‘UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’

The IDE error underlines Sprite and says ambiguous reference:
UnityEngine.Sprite
UnityEngine.Sprite
match

The IDE error underlines MonoBehaviour and says ambiguous reference:
UnityEngine.MonoBehaviour
UnityEngine.MonoBehaviour
match

adding a reference can be done via assembly definitions, you definitely never need to or should copy Unity DLLs inside your project

I had copied the UnityEngine.dll into my project which was causing the issue. Thanks.