1

In VS code by default language for XML file would be ForceSourceManifest (right bottom corner of the editor). You cannot comment XML code with this.

2 Answers 2

3
  1. Click "ForceSourceManifest". (to enter Select Language Mode)
  2. Click "Configure File Association for '.xml'"
  3. Insert "XML" (in the search bar)
  4. Click "XML"

Then you can comment everything in .xml files happily.

0

Just wanted to post a warning here as we spent several days trying to figure out why a user couldn't deploy/retrieve a manifest file and the expected commands/context options weren't being displayed. When you change the file association away from the forcesourcemanifest type the file won't be recognized as a manifest file for the Salesforce project.

In fact you'll see the standard deploy/retrieve command and it's throw an error that makes sense in retrospect, but is totally confusing when it happens.

The Error:

Error deploying or retrieving source: 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.

Note in the command palette and and context menu for the manifest file you'll find the following commands instead of the manifest specific versions SFDX:Retrieve Source from Org SFDX:Deploy Source to Org

You must log in to answer this question.

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