Newer Version Available
Which Package Dependencies Work with Second-Generation Managed Packages?
To develop small, modular packages, you create dependencies between your packages. A package dependency is when metadata contained in one package depends on metadata contained in another package. These dependencies allow you to extend the functionality of the base package with components and metadata located in a separate package.
When working with both first-generation (managed 1GP) and second-generation (managed 2GP) packages, only certain combinations of packages are supported.
| Can a managed 2GP package depend on a managed 1GP package? | Yes |
| Can a managed 2GP package depend on another managed 2GP package? | Yes |
| Can a managed 1GP package depend on a managed 2GP package? | No. This dependency isn’t supported, and we block the installation of managed 2GP
packages in managed 1GP packaging orgs. We can override this behavior on an individual basis. To share your scenario and request an override, log a case with Salesforce Partner Support. We’re investigating how to support this dependency scenario more broadly. |
| Can a managed 1GP package depend on another managed 1GP package? | Yes |
| Can a managed 2GP package depend on an unlocked package? | Not recommended. However, you can build an unlocked package that depends on a managed 1GP or managed 2GP package. |