How to upload dll using package manager?

When I try to upload my extension using Package manager, I get the alert in the console that “Asset bundles can not include Editor Objects (DefaultAsset): Assets/mydll.dll”

I wonder why I am getting this message and how to overcome it,
Thank you

Class libraries cannot be part of an Asset Bundle, partially because its a security risk to inject code onto your application from the internet (viruses, anyone?). The other reason is that the whole Asset Bundle mechanism mirrors what happens to non-script assets when you build them with a player - when you build, scripts become .dll files, and non-scripts become .asset files.

You could tackle this in one of two ways:

  1. Leave the assembly as a part of the project; Don’t worry, all your prefabs that link with the library classes will still properly link.

  2. If your class library does not have any MonoBehaviour scripts, then it is possible to stream it from an website using the method AngryAnt used in his experiment Downloading the Hydra. This only works with libraries that don’t have MonoBehaviours (or, more specifically, classes in the library that aren’t MonoBehaviours), because all assets Unity refers to in serialized files have to be registered with the AssetDatabase in order for them to be properly referenced when deserialization happens. The whole thing AngryAnt does in his demo goes outside of the registry, and as far as I know, Unity doesn’t provide a direct way to dynamically register assets with the database (aside from whatever happens inside AssetBundle functions).

It’s frustrating, yes, but hopefully that clears it up for you.