For instance, my package depends on json.dll,while other package by other author may include this assembly as well. This will result in compile error in unity editor , which say “Multiple precompiled assemblies with the same name”.
So, it there a best practice for package developers to ship common assembly file in package?
Use correct name spaces.
Use none conflicting dls.
Move common dependencies as separate assembly.
Or allow override dlls.
When it comes to Json: use the Json that Unity ships with.
Where JsonUtility doesn’t suffice, add a dependency to the Json package instead.
Newtonsoft Json.NET is a bit of a special case because it is so commonly used. Various Unity packages also depend on Json.NET, and will include a specific version that is tailored to Unity, which you can download yourself from the Package Manager. Multiple Json.NET assemblies in the project can cause conflicts. If I were you, I would download this particular Json.NET package, and point your compiler to it when compiling your DLL, to ensure compatibility. Then, when you distribute your asset to the Asset Store, you can specify a Package Manager dependency. If you would like your Asset Store asset to be downloaded into the user’s embedded Packages directory, and viewed in the Package Manager like other packages you can use these experimental tools to submit your package that way to the Asset Store: GitHub - needle-tools/hybrid-packages: Export UPM packages as .unitypackage files In order to get my various dependencies on Json.NET to all agree, I manually embedded the one you can download from the Package Manager into my Packages directory, which locks the version and allows everything (Unity packages and everything else in your project) to all reference that one version of Json.NET. The only downside is that you have to manually update it once a particular version is embedded in that project. The PackageManager loses the nice versioning and updating feature for packages that come from a registry. Here are the two most popular posts on the topic of Json.NET conflicts, and my step-by-step solution for resolving them: Newtonsoft Json package page-3#post-9067615 / Conflict between Asset's Newtonsoft and PackageManager's Newtonsoft page-2#post-9067537 Hopefully you can specify your Package Manager dependency appropriately when you submit to the asset store, but you may have to include special instructions for your users on how to manually embed the necessary package into the project. I’m not 100% sure, but hopefully this info dump can help point you in the right direction.