How can I resolve conflicting DLLs in two of my Unity packages?

Viewed 140

I have two packages installed, and both contain the same precompiled assembly file. This causes an error in Unity and I have no idea how to resolve this issue. Both files are necessary for the packages to function, so deleting them is not in question. How should I resolve this error?

I've forked one of the packages and attempted to rename the DLL file and re-add everything into the Assembly References section of the Assembly Definition Import file - however, one version of the DLL file is 3.8.0.0 while the other is 3.15.0.0.

The DLL file is Google.Protobuf.DLL

Many thanks.

1 Answers

Welcome to the Dependency Hell =)

If we are talking about how to resolve this - don't think there is some easy solution =/ I can suggest several options but both are not perfect at all.

Let's say that package A requires protobuf v3.8.0.0 and package B requires protobuf v 3.15.0.0.

  • First of all, you can try to check older releases of package B to try to find one with protobuf v3.8 dependency instead of v3.15. Or, vice versa, try to find newer release of package A with v3.15 dependency instead of v3.8. If you are lucky enough - it can help.

  • If package A or package B has source code available (for example, it is a git repo), you can try to adapt it to another version of the protobuf library manually (create your custom version or even make a pull request to the package repo). But this variant can cause future problems with package updates as you will have to support your custom changes.

Related