Skip to content

Deleting Apex Test Class via CLI in VS Code Throws Conflicts detected and Lists All Metadata Files in Repo #6778

@nickytorstensson

Description

@nickytorstensson

Note
Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
    • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

Deleting an apex class test class in VS Code via SFDX: Delete This from Project and Org throws

11:39:47.584 Starting SFDX: Delete from Project and Org
Conflicts detected. Resolve conflicts before deleting. Conflicts:

  • CustomApplication:MyCustomApp(c:\Users\nto\Repositories\Salesforce\force-app\main\default\applications\MyCustomApp.app-meta.xml),
  • AuraDefinitionBundle:New_Note_Global_Action (c:\Users\nto\Repositories\Salesforce\force-app\main\default\aura\New_Note_Global_Action\New_Note_Global_Action.cmp-meta.xml,
  • ... continues to list every single metadata file in the repository

I would not expect this from the Salesforce CLI, because essentially it is a test class, and it is not being referenced in every single other file.

Steps To Reproduce

  1. Have a Salesforce metadata repository loaded in VS Code with all the necessary Salesforce extensions added.
  2. Right-click on an apex test class, and select SFDX: Delete This from Project and Org
  3. See expected vs actual

IMPORTANT
Provide a repository that's configured to reproduce the issue. If you are unable to provide a repo, please explain why not. The more info we have from the start, the faster we can resolve your issue.
We may close your issue if you don't include proper instructions.

  • Generate a project with sf project generate or fork dreamhouse-lwc.
  • Provide detailed step-by-step instructions on how to reproduce the issue.

I cannot provide a repository, as this is customer data.

I understand that as a result of this missing, you might close the issue. But I am hoping that you might know what is wrong, based on the issue - or that others experience the same issue might be able to contribute.

Expected result

Expected that either the apex test class is successfully deleted
OR
A realistic error is thrown

Actual result

The error thrown lists the entire repository as a source of conflict for deleting the apex class

Additional information

Image

System Information

{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.117.7",
  "nodeVersion": "node-v22.21.1",
  "osVersion": "Windows_NT 10.0.26100",
  "rootPath": "C:\\Users\\ext-nto\\AppData\\Local\\sf\\client\\2.117.7-026ac93",
  "shell": "powershell",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.39 (core)",
    "@oclif/plugin-commands 4.1.38 (core)",
    "@oclif/plugin-help 6.2.36 (core)",
    "@oclif/plugin-not-found 3.2.73 (core)",
    "@oclif/plugin-plugins 5.4.54 (core)",
    "@oclif/plugin-search 1.2.36 (core)",
    "@oclif/plugin-update 4.7.16 (core)",
    "@oclif/plugin-version 2.2.36 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.53 (core)",
    "@oclif/plugin-which 3.2.42 (core)",
    "@salesforce/cli 2.117.7 (core)",
    "agent 1.26.0 (core)",
    "apex 3.9.5 (core)",
    "api 1.3.6 (core)",
    "auth 3.9.26 (core)",
    "code-analyzer 5.8.0 (user) published 15 days ago (Mon Dec 29 2025)",
    "data 4.0.66 (core)",
    "deploy-retrieve 3.24.5 (core)",
    "info 3.4.100 (core)",
    "limits 3.3.74 (core)",
    "marketplace 1.3.8 (core)",
    "org 5.9.53 (core)",
    "packaging 2.24.2 (core)",
    "schema 3.3.90 (core)",
    "settings 2.4.54 (core)",
    "sobject 1.4.81 (core)",
    "telemetry 3.6.71 (core)",
    "templates 56.4.0 (core)",
    "trust 3.7.113 (core)",
    "user 3.6.44 (core)",
    "sfdx-git-delta 6.25.0 (user) published 3 days ago (Fri Jan 09 2026)"
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions