How to reference UnityEditor in external DLL when using UnityVS, successfully?

So I'm trying to put my scripts and custom inspector editor scripts in two external DLLs and I'm facing a problem on my Editor DLL. First of, I'm using UnityVS with Visual Studio 2013 Ultimate.

I added a reference to C:\Program Files (x86)\Unity\Editor\Data\Managed\UnityEditor.dll and it successfully shows me IntelliSense and I can access all classes and it's members, too. But when I try to compile the build, it will complain not finding the assembly UnityEditor. Even referencing the same DLL like the UnityProject (inside the Library folder) results in that problem, as it's just a copy of installed UnityEditor.dll.

I even tried to open this project in a separate Visual Studio and build it, got the same result.

I've heard, placing the resulting DLL in the Editor folder will make the custom inspectors available, so I really wish this would compile.

• Have you tried copying the DLL to somewhere in the assets folder in the project? – fastinvsqrt Dec 21 '14 at 16:27
• What DLL? Due the error it will not compile and build the external DLL. The unity project is not affected with the problem directly. When it builds fine it would be copied to the Editor folder of my Assets folder by my post build event script, but I don't even get that far. – modiX Dec 21 '14 at 17:13
• The DLL that you are trying to reference (UnityEditor.dll). Try placing it somewhere in your assets folder. – fastinvsqrt Dec 21 '14 at 19:11
• @fastinvsqrt I've put the UnityEditor.dll in Assets\Editor and referenced it in my external DLL project, the problem remains. – modiX Dec 21 '14 at 19:38