Tried creating assembly definition files from scratch in an empty project. Turns out, MonoBehaviours are not recognized as such in some assemblies, it is not possible to attach them if they are in a defined assembly. Once it's moved outside, it works fine. Bug report case #943090. Also, is there going to be an API for this feature? It is important for code generation tools that run from within Unity. Parsing JSON files just to get a list of assemblies sounds like a waste of time.