We have a Managed package, and we want to create another Managed Package extension in the same Dev org. Can I create 2 Managed Packages in 1 Dev org? If not, what are my options and do I have to pay Salesforce to increase the limit?
You cannot create two managed packages in one dev org, you can only have one namespace created per DE org.
Your options are to create another DE org and install the first managed package in there. Then, once you start to reference the first managed package in the new DE org, then that package becomes an extension of the first. Once you release your second managed package, subscribers would have to install the first package and then the second.
Phil is correct for 1st gen packages.
2nd gen packages are indeed not out of beta yet. Notably, Salesforce hasn't fully documented exactly how 2GP will get connected to Publishing Console, Security Review, LMA, COA etc. But going by current info, here's basically how it would work once they go live:
- Your DE org will still "own" the namespace.
- You'd create a link from your Production org, which has a Dev Hub, to the DE org so that it "registers" the namespace and has permission to use it in 2GP.
- Your Dev Hub can now create scratch orgs with this namespace (this part is already GA).
- Your Dev Hub can now create packages with this namespace, and they can be multiple different packages. (beta)
- Different packages with the same namespace have some special rules on what they can/can't share with each other. (beta)