Move to 2GP: Migrate Your Managed Packages with Ease
Are you still using first-generation managed packaging (1GP) for your package development work? If so, you’re not alone. Many ISVs like you are looking to move to second-generation managed packaging (2GP) and take advantage of its many benefits.
If you don’t have customers who are still using 1GP packages you created, you can skip this chapter and move straight to learning how to build new 2GP packages.
Package migration involves two main steps: converting an existing 1GP package into a 2GP package, and then migrating the 2GP package into a subscriber org. Package migration won’t change your package’s metadata, or disrrupt any subscriber data associated with your package.
-
About Package Conversion and Package Migration
There are two main stages involved in package migrations. It starts with package conversion and ends with package migration.
-
Three Phases of Package Migration Development
As you move from 1GP development to 2GP development, you’ll move through three phases.
-
Are you ready to move your subscribers to 2GP? The speed and ease of your package migration depend on a few key factors.
-
Before You Begin Package Migrations
If you’ve never created or worked with managed 2GP packages, scratch orgs, or Salesforce CLI, take some time to learn more about Salesforce DX and second-generation managed packages.
-
Convert Your Managed 1GP Package to 2GP
Before you convert your managed 1GP package version, ensure your development environment is set up.
-
Migrate Your Subscribers from 1GP to 2GP
Are you ready to migrate your converted package? To migrate a package you install the converted 2GP package into a subscriber org that already has the managed 1GP package version installed. Package migration requires that the major and minor version of the subscriber’s installed package, match the major and minor version of 2GP you’re installing.
-
Move to 2GP Package Development
After you thoroughly test converted packages and migrations, complete your move to 2GP development.
-
Considerations for Package Migrations
Review these limits and considerations for converting and migrating packages.
-
Troubleshoot Package Conversion Failures
Here are some possible error scenarios that can occur when you convert a package.