Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Salesforce Auto Update Package.xmlNew to Visual Studio Code? Get it now.
Salesforce Auto Update Package.xml

Salesforce Auto Update Package.xml

Dot Compliance

|
121 installs
| (1) | Free
Automatically updates package.xml in the force-app folder of a Salesforce project by tracking file changes and supporting Git branch awareness.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VS Code Extension: Salesforce Auto Update Package.xml

A VS Code extension that monitors create, delete, and update events in the force-app folder of a Salesforce project. It automatically updates the package.xml file to reflect changes in metadata, saving developers from manually managing deployment packages after each file modification.

The extension also works with Git branches to ensure the appropriate version of the package.xml file is updated based on the active branch.

Salesforce CLI Version 2.0+ Awareness

This extension is fully compatible with Salesforce CLI version 2.0 and later.

Features

  • File Monitoring: Detects file changes (create, delete, update) in the force-app/main/default directory and updates package.xml and destructiveChanges.xml accordingly.
  • Git Branch Awareness (Optional): If Git is connected, the extension updates the appropriate package.xml version based on the active branch:
    • Master Branch: Updates manifest/package.xml and the latest package.xml.
    • Release Branch: Updates manifest/package.xml and the release version of package.xml.
    • Patch Branch: Updates manifest/patch-package.xml and the release version of package.xml.
  • No Git Required: If Git is not connected, the extension updates the package.xml file based on file changes without considering the branch.
  • Sort XML File: The extension provides the ability to sort XML files using the command Ctrl+Shift+P and selecting "Dot: Sort XML File".

Installation

Install the Extension in VS Code

  1. Open the Extensions view in VS Code (Ctrl+Shift+X or Cmd+Shift+X on macOS).
  2. Search for Auto Update Package.xml and click Install.

Prerequisites

  • Your project should have a force-app/main/default directory containing Salesforce metadata files.
  • Git is optional; the extension works with or without Git.

Usage

Automatic File Monitoring

Once installed, the extension automatically starts monitoring file changes in force-app/main/default.

File Changes Handling

  • File Creation/Modification: The extension adds or updates the corresponding metadata entries in package.xml.
  • File Deletion: The extension removes the entry from package.xml and adds it to destructiveChanges.xml for proper removal from Salesforce.

Git Branch Awareness (Optional)

If Git is connected, the extension updates the appropriate package.xml version based on the active branch:

  • Master Branch: Updates manifest/package.xml and the latest package.xml.
  • Release Branch: Updates manifest/package.xml and the release version of package.xml.
  • Patch Branch: Updates manifest/patch-package.xml and the release version of package.xml.

If Git is not connected, the extension updates the default package.xml without considering the branch.

Example Workflow

  1. Switch to the desired Git branch (if applicable) or continue working in your Salesforce project.
  2. Create, modify, or delete files in force-app/main/default.
  3. The extension automatically updates package.xml and destructiveChanges.xml as needed.

Configuration

No additional configuration is required. The extension automatically detects file changes and updates package.xml and destructiveChanges.xml.

Contributing

Contributions are welcome! You can help by:

  • Reporting issues and suggesting improvements.
  • Improving documentation.

Feel free to give us feedback and contribute to the project!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft