Error creating a package version

I get an error while trying to create a package version with this command

sfdx force:package:version:create -p MySalesforcePackage -d force-app -k MyPassWord --wait 10 -v DevHub

This is the arror. It was created as an Unmanaged Package

ERROR:  MyConnectedAppApiName: Installing an app (MyConnectedAppApiName) that has been deleted.

This is the connected App inside the folder force-app/main/defult/connectedApps

<?xml version="1.0" encoding="UTF-8"?>
<ConnectedApp xmlns="">
<contactEmail><a href="" class="__cf_email__" data-cfemail="d6b0b7b4a4bfacbfb996bbafa5bfa2b3f8b5b9bb">[email protected]</a></contactEmail>
<description>Connected App</description>
<label>My App</label>


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

So i found out what the problem is Connected Apps are not available in Unmanaged Packages, they are available in managed Packages.

Method 2

To reconfirm after spending way too many hours researching: No

Page 40 from “Package and Distribute Your Apps” spring 19
Connected Apps
• Connected apps can be added to managed packages, only. Connected apps are not supported for unmanaged packages.

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x