error dragging C# files

Hello,

Here is my problem:

I get the following error message when I drag a C# code file (project tab) to the right bottom of the inspector screen (where there is the ‘add component button’).

Here is the error message :

Thanks in advance,

A+

Only components derived from MonoBehaviour can be added to a GameObject.

Without seeing the script we really can’t do anything aside from repeat the error message, which is pretty clear.