package.xml shows API v55 for new SFDX project although v56 is selected in connection

Issue #2230 resolved
René Görgens created an issue

Hi Scott,

On a fresh SFDX project connected to a sandbox, my package.xml shows API v55. Additionally, package.xml contains default wildcard subscriptions that are not necessarily relevant to every project.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
<name>ApexClass</name>
</types>
<types>
<members>*</members>
<name>ApexComponent</name>
</types>
<types>
<members>*</members>
<name>ApexPage</name>
</types>
<types>
<members>*</members>
<name>ApexTestSuite</name>
</types>
<types>
<members>*</members>
<name>ApexTrigger</name>
</types>
<types>
<members>*</members>
<name>AuraDefinitionBundle</name>
</types>
<types>
<members>*</members>
<name>LightningComponentBundle</name>
</types>
<types>
<members>*</members>
<name>StaticResource</name>
</types>
<version>55.0</version>
</Package>

I configured API v56 for the sandbox connection (cf. issue 2229):

My workaround being to update the API version manually, and remove the wildcard subscriptions manually.

Comments (4)

  1. Scott Wells repo owner

    For a source format project, the project-specific API version number is derived from the sfdx-project.json file. The version number you see for CLI-based connection in the absence of a project is the default for IC2 which corresponds to the latest based on the Salesforce platform version. A CLI-based connection doesn’t have a concrete API version number associated with it.

    IC2’s SFDX project creation wizard is effectively an integrated wrapper atop the force:project:create command. That command creates the project structure and populates all of the initial project files including the sfdx-project.json and the manifest/package.xml (if you use the -x/--manifest argument). Typically Salesforce updates the API version number in the CLI project templates in conjunction with their release, but it doesn’t appear they’ve done so yet as a raw execution of that command using the latest CLI still includes the older version number.

    I’ve logged this in the CLI public issue tracker:

    https://github.com/forcedotcom/cli/issues/1780

  2. Scott Wells repo owner

    The core issue is that the Winter '23 project file templates aren't using the correct API version number. Issue logged against the CLI.

  3. Log in to comment