.dll file With MonoBehaviours/Editor Extensions?

“Managed .NET DLLs can now be placed in the project folder and can contain script code, including MonoBehaviours, EditorWindows and ScriptableObjects. This allows you to move any code into a DLL, making code sharing between projects easier, and making it easier for middleware developers to create libraries without sharing the source code. This was introduced in Unity 3.0 but was not mentioned in the release notes.”

One question is about having MonoBehaviour scripting inside a .dll. The biggest reason I extend MonoBehaviour is if I need to attach a script to a game object. Now is it actually possible to include a script inside of a .dll that then can be attached to a game object? If so how is that possible?

Another question I have is about editor extensions. Form what I remember, beforehand editor extension needs to be placed inside a folder called Editor. Do I need to follow any type of convention with editor extension in .dll files?

AngryAnt recently wrote an article on the blog on how to get editor classes into such DLLs as this will commonly not work.
What you generally have to do is get the editor classes in there but create proxy classes that are in the unity project, cause the EditorWindow.GetWindow function will not work from the dll, but you can “new” editor classes in the assembly to fire up

MonoBehaviors can be gotten in there without any problem, just create a .NET class library project in Visual Studio or MonoDevelop.