How to keep .asmdef references when exporting a ".dll"?

I divided my project with different .asmdef in order to have different .dll.

Now I want to import one of the dll (Eg. MyDll) created with .asmdef (copied from Library/ScriptAssemblies) inside another unity project.

The problem is that, even if I import also the third parties it depends on, MyDll has references to others .asmdef files (dll) that are not being imported with the asset package I created through “Export Packages…”.

How can I import in a package also those “.asmdef” files in order to have the references ?

I almost solved my problem putting everything I needed in one folder, in such a way unity allowed me to import everything in another project and it loaded the MyDll.dll without notifying any reference problem.

Nonetheless the scripts that were dependent from Oculus inside MyDll.dll have been deleted .

My folders structure looks like this now:

- MyPackage
-- MyDll.dll
-- ThirdParties
--- Oculus