I have an old Unity project where I build a couple of (c#)editor-scripts into a dll years ago. I am still using the dll a lot, but now I made some changes to the original scripts, and so I want to compile them into a dll again.
I don't know much about dll's and compiling and stuff like that, but luckily I wrote down exactly what I had to do to compile it into a dll, which is the following lines that I enter into Visual Studio 2010 command prompt:
csc /target:library /out:MyDLL.DLL /reference:"C:\Program Files (x86)\Unity_3.5.1f2\Editor\Data\Managed\UnityEngine.dll" MyEditorScript.cs
However when I do that, I get the error: "error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?"
I'm using the exact same (old) Unity version as I did back then, as well as the same Visual Studio (I do actually have and use new versions of both Visual Studio and Unity, here it just seemed safer to stick to what worked before), so I really don't understand why it doesn't work anymore. I mean, I understand it needs the UnityEditor dll, but how come it worked before then?
There is a UnityEditor.dll in the same location as the UnityEngine.dll I reference in the command prompt, but when I try to add that (like this: csc /target:library /out:MyDLL.DLL /reference:"C:\Program Files (x86)\Unity_3.5.1f2\Editor\Data\Managed\UnityEngine.dll" "C:\Program Files (x86)\Unity_3.5.1f2\Editor\Data\Managed\UnityEditor.dll" MyEditorScript.cs) It complains that the dll is a binary for some reason.
Does anyone know how to fix this?