Seems like the latest VS Code version is not pulling managed package components to the workspace.

I have it connected with my dev org that contains the managed package which I have released in salesforce app exchange.

Until last week I was able to use VS Code to modify apex classes and aura components from the same managed package.

I recreated the project and now I only see unmanaged components. How can I pull managed package components in VS Code? Thanks.

1 Answer 1


You can't pull them from the installed version, so make sure you're using the correct org. Other than that, you can just retrieve them by package name on the command line:

sfdx force:source:retrieve -p "My Package Name" -u devOrgAlias

Or through the GUI, whichever you prefer. I generally prefer a CLI.

  • Thanks, @sfdcfox. Just to confirm, I have connected vs code with my dev org where this managed package has been developed, i.e. I can edit the code in the package, as I am the owner. In VS Code editor, I am not seeing these managed components in the org browser (cloud icon). It used to show them until last week, so not sure what's changed. I tried the CLI, but its throwing "Unexpected file found in package directory: /Users/sidharthagarwal/Documents/vscode-workspace/FieldPro2/fpro" error Commented Jun 22, 2021 at 1:29
  • @SidharthAgarwal Ah, it sounds like an unexpected file ended up in your FieldPro2 directory. Try using the CLI, it should give you a more precise error on which file was unexpected.
    – sfdcfox
    Commented Jun 22, 2021 at 1:36
  • The error was from CLI only. Will try more. But do you happen to know why the org browser (cloud icon) not showing these codes? As I mentioned it used to show until last week. This was pretty easy since I could fetch only the files I care about, by just clicking on them\. Commented Jun 22, 2021 at 1:52
  • @SidharthAgarwal not sure. Maybe check the logs? I'll see if it's working on my system, I don't use Org Browser much.
    – sfdcfox
    Commented Jun 22, 2021 at 2:53
  • The below link explains it well. I was able to pull all package components in my VS Code. sfdx-isv.github.io/sfdx-workshop/sfdx-managed-packages/… sfdx force:mdapi:retrieve \ -u [email protected] \ -p "FieldPro" \ -r mdapi-source \ -s Also, we could use the below sample commends to pull all components, irrespective they below to a package or not sfdx force:source:retrieve -m CustomObject sfdx force:source:retrieve -m ApexClass sfdx force:source:retrieve -m ApexPage Commented Jun 22, 2021 at 19:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .