BCE0005: Unknown identifier: 'EditorPrefs'.

Iam using editorprefs to set a key in the registry. This key contains data which i use in another project (playerprefs only is to set a variable for 1 project, thats why i used editorprefs)

When i press play the keys are set and i can use them in other projects. However when i build the project i get the error:
BCE0005: Unknown identifier: ‘EditorPrefs’.
Can anybody help me solve this

From the docs. (I think this is the problem)

Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add “using UnityEditor;” at the beginning of the script.