Manual scripts compilation

I want to be able to compile all assemblies deciding target platform and being able to publish them in a folder outside Unity.

I saw this API but it doesn’t help because I only can compile it for Editor and not Player and also it generates it on Library/ScriptAssemblies.

I don’t want to use AssemblyBuilder API because that way I need to manage all dependencies manually and it’s really hard to achieve.

This sounds somewhat similar to what I asked here . Do the assemblies you need somewhere else contain scripts attached to objects in your scenes too?