Will not allow me to create ANY Scripts.

Whenever I try to create a new script file inside of Unity it gives me this error,

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.BaseProjectWindow.BeginPreimportedNameEditing (Int32 instanceID, EndAction endAction, System.String pathName, UnityEngine.Texture2D icon, System.String resourceFile) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/ProjectWindow/ProjectWindow.cs:620)
UnityEditor.ProjectWindowUtil.StartNameEditingIfProjectWindowExists (Int32 instanceID, EndAction endAction, System.String pathName, UnityEngine.Texture2D icon, System.String resourceFile) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/ProjectWindow/ProjectWindowUtil.cs:142)
UnityEditor.ProjectWindowUtil.CreateScriptAsset (System.String templatePath, System.String destName) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/ProjectWindow/ProjectWindowUtil.cs:106)

Is it something to do with my paths being screwed up? As I have MonoDevelop installed. (I think that’s what it’s called) I really need help on this as I need to start creating scripts for my new project.

Fixed, I’ll answer so no one else bothers.

I fixed it… I don’t know if it is a good solution, but I deleted the entire library folder inside the project. After that, just restart the project. It should take a while, but the project should open up normally.

I know its not a good solution to the problem, because all scripts which you attached on any gameObjects will have to be reattached manually. Aside from that, after doing all that, I was able to create new objects and scripts from the Assets>Create menu.

I would like it if someone could tell me why this error occurred in the first place, and what did deleting the library folder actually accomplish, as I am unaware of the fine points myself.