title: How to exclude UnityEditor reference from asmdef?
body: <p>How to exclude UnityEditor reference from asmdef?</p>
  <p>Why I need it:</p>
  <p>I have an asmdef file. For example, it is <code>MyAssembly/MyAssembly.asmdef</code>. The <code>MyAssembly</code> contains a lot of features and each feature staff is placed in its own folder. And some of these features has a code that is needed only in editor, and it refers to UnityEditor namespace. Such editor code is placed into an Editor folder.</p>
  <p>But as you know, Editor folder name means nothing in terms of asmdef usage. So I add AssemblyDefenitionReference in each folder and refer it to the <code>MyAssemblyEditor.asmdef</code> assembly definition. So the paths looks like this:</p>
  <ul>
  <li><code>MyAssembly/MyAssembly.asmdef</code></li>
  <li><code>MyAssembly/Editor/MyAssemblyEditor.asmdef</code> - this folder contains no code. It's needed just to place asmdef, because it's not allowed to place two asmdefs in a single folder.</li>
  <li><code>MyAssembly/SomeFeature/Editor/*feature editor staff*</code></li>
  <li><code>MyAssembly/SomeFeature/Editor/Editor.asmref</code> - refers to <code>MyAssemblyEditor.asmdef</code></li>
  <li><code>MyAssembly/SomeFeature/*feature staff*</code></li>
  </ul>
  <p>All this works good. But the problem is that, when some developer adds a new feature, he can forget to add a reference to the <code>MyAssemblyEditor.asmdef</code> in the editor folder. And there are no any errors will be shown in this case. This mistake will be revealed only when the build will be cooked. But I'd like that using of UnityEditor in <code>MyAssembly</code> will be instantly marked as an error.</p>
  <p>Feel free to suggest other solution for this problem.</p>