---
schema_version: "1"
id: d7ffb82352119e16b5f39cbf24c4a2a0a7b8a4e7af9197df7e2a8e0cfeaf5a68
title: Create a First-Generation Managed Package using Salesforce DX
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform-pkg-exchange/managed_packaging/guides/first-generation/build-first-gen-dx/sfdx-dev-build-release.md
canonical_url: https://developer.salesforce.com/docs/platform/pkg1-dev/guide/sfdx-dev-build-release.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7ff6157a8438291fbb72c0602cae7cab6be576f570c1acbeb7cf5ded4abae213
products:
  - First-Generation Managed Packaging Developer Guide
  - merged-docs
---

# Create a First-Generation Managed Package using Salesforce DX

If you’re an ISV, you want to build a managed package. A managed package is a bundle of components that make up an application or piece of functionality. A managed package is a great way to release an app for sale and to support licensing your features. You can protect intellectual property because the source code of many components isn’t available through the package. You can also roll out upgrades to the package.

When you’re working with your production org, you create a .zip file of metadata components and deploy them through Metadata API. The .zip file contains:

- A package manifest (`package.xml`) that lists what to retrieve or deploy
- One or more XML components organized into folders

If you don’t have the packaged source already in the source format, you can retrieve it from the org and convert it using the CLI.

- **[Enable Dev Hub and Second-Generation Managed Packaging](https://developer.salesforce.com/docs/platform/second-generation/sfdx-pkg-enable-devhub.md)**


    The Dev Hub lets you create and manage second-generation managed packages and scratch orgs. Your Dev Hub is the designated place to find and manage all your managed 2GP packages, scratch orgs, and namespaces.

- **[Limited Access License for Package Developers](https://developer.salesforce.com/docs/platform/second-generation/sfdx-pkg-slalf-pkg-dev.md)**


    The Salesforce Limited Access - Free is designed for users whose role is to build customizations or applications. This license provides access to the Dev Hub, development tools, and environments. In the production org, this license restricts access to standard and custom objects. Partner Business Orgs (PBO) include 100 Salesforce Limited Access - Free user licenses.

- **[Add a Limited Access User to Your Dev Hub Org](https://developer.salesforce.com/docs/platform/second-generation/sfdx-pkg-add-free-license-user.md)**


    Provide your developers access to the Dev Hub and Salesforce DX development tools by adding a user with Salesforce Limited Access - Free license and the Limited Access user profile in your Dev Hub org. Then create and assign them a permission set to the required Dev Hub objects.

- **[Link a Namespace to a Dev Hub Org](https://developer.salesforce.com/docs/platform/second-generation/sfdx-dev-reg-namespace.md)**


    To use a namespace with a scratch org, you must link the Developer Edition org where the namespace is registered to a Dev Hub org.

- **[Scratch Orgs and Package Development](https://developer.salesforce.com/docs/platform/second-generation/dev-hub-intro.md)**


    Scratch orgs are temporary Salesforce orgs intended for development and automation. They enable source-driven deployments of Salesforce code and metadata. A scratch org is fully configurable, allowing developers to emulate different Salesforce editions with various features and preferences.

- **[Build and Release Your App with Managed Packages](https://developer.salesforce.com/docs/platform/pkg1-dev/guide/sfdx-dev-build-man-pack.md)**


    If you developed and tested your app, you’re well on your way to releasing it. Luckily, when it’s time to build and release an app as a managed package, you’ve got options. You can package an app you developed from scratch. If you’re experimenting, you can also build a sample app from Salesforce and emulate the release process.

- **[Packaging Checklist](https://developer.salesforce.com/docs/platform/pkg1-dev/guide/sfdx-dev-build-package-checklist.md)**


    Ready to deploy your packaging metadata and start creating a package? Take a few minutes to verify that you covered the items in this checklist, and you’re good to go.

- **[Deploy the Package Metadata to the Packaging Org](https://developer.salesforce.com/docs/platform/pkg1-dev/guide/sfdx-dev-build-man-pack-deploy.md)**


    Before you deploy the package metadata into your packaging org, you convert from source format to metadata format.

- **[Create a Beta Version of Your App](https://developer.salesforce.com/docs/platform/pkg1-dev/guide/sfdx-dev-build-man-pack-beta.md)**


    Test your app in a scratch org, or share the app for evaluation by creating a beta version.

- **[Install the Package in a Target Org](https://developer.salesforce.com/docs/platform/pkg1-dev/guide/sfdx-dev-build-man-pack-install.md)**


    After you create a package with the CLI, install the package in a target org. You can install the package in any org you can authenticate, including a scratch org.

- **[Create a Managed Package Version of Your App](https://developer.salesforce.com/docs/platform/pkg1-dev/guide/sfdx-dev-build-man-pack-create.md)**


    After your testing is done, your app is almost ready to be published in your enterprise or on AgentExchange. Generate a new managed package version in your Dev Hub org.

- **[View Information About a Package](https://developer.salesforce.com/docs/platform/pkg1-dev/guide/sfdx-dev-build-man-pack-viewinfo.md)**


    View the details about a specific package version, including its metadata package ID, package name, release state, and build number.
