Unity 5.1 "using UnityEditor" is throwing error messages

since I installed Unity 5.1 I can’t use UnityEnigne anymore.

I get this error message in Visual Studio:

The type or namespace name ‘UnityEditor’ could not be found (are you missing a using directive or an assembly reference?)

Is the script in the Editor folder? You can only use UnityEditor from the editor folder.

I found the problem. A scriptable object was missing.