Salesforce Fact #424 | Location of package.xml in VSCode

We know that using a package.xml file in VSCode we can deploy or retrieve metadata from the connected org. But do you know the location of this package.xml is important.

When we create a new SFDX project with Manifest, then it is placed inside a folder called Manifest which is the correct structure. But suppose if you have already created the project without Manifest and later on adding the package.xml file. Then, we need to create a new folder named 'Manifest' and inside that create the file package.xml and then you can retrieve or deploy the metadata successfully. If we try to create and keep the package.xml file outside the folder, it will throw the error: 'The file or directory that you tried to deploy or retrieve isn't in a package directory that's specified in your sfdx-project.json file'.

Attached are the screenshots.


To resolve the error, we need to keep the file inside Manifest folder.



Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow