Build error

I tried to build my project but i got this error doesnt matter the platform i choose, and only in this project i get this error, i treid reimporting assets but that didnt help

UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

When building - remove editor functionality.

Oh, and also it gives me this error (just when i try to build it )

Assets/Scripts/BountyLoader.cs(5,7): error CS0246: The type or namespace name `UnityEditor’ could not be found. Are you missing an assembly reference?