Which Package Types Can Your Package Depend On?
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 in a separate extension package.
When working with packaging, only certain combinations of packages are supported.
| Can a Managed 1GP Depend on a ... | Can a Managed 2GP Depend on a ... | Can an Unlocked Package Depend on a ... | Can an Unmanaged Package Depend on a ... | |
|---|---|---|---|---|
| Managed 1GP | Yes | Yes | Yes | No |
| Managed 2GP | No1 | Yes | Yes | No |
| Unlocked package | Not recommended | Not recommended | Yes | No |
| Unmanaged package | Not recommended | Not recommended | Not recommended | No |
1This 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.