Application customizer and list view command set extensions support tenant-wide deployment, which enables administrators to indicate they want the extension to automatically be available in all site collections in the tenant when deploying to the tenant app catalog or in the target site collection using the site collection app catalog. Administrators do this by selecting Enable this app and add it to all sites option in the Enable app dialog when using the modern app catalog experience or by selecting Make this solution available to all sites in the organization when using the classic app catalog experience.
Please note that when deploying to a site collection app catalog, the prompt to Make this solution available to all sites in the organization is misleading. Despite the wording, when this option is selected the solution will only be made available in the target site collection.
Doing this adds a list item in the Tenant wide extensions list, which is contained in the same site as the Apps for SharePoint list. The values for the fields of this list item are configured in the ClientSideInstance.xml file. Each time the extension is loaded, it will get it's configuration from the appropriate item in the Tenant wide extensions list.
Please note that the Tenant wide extensions list may be hidden. If this is the case you can get to it by adding /Lists/TenantWideExtensions/AllItems.aspx to the site URL.
If the administrator chooses not to use tenant-wide deployment, that is they select Only enable this app in the Enable app dialog, then the app containing the extension will need to be explicitly installed in the site collections where it will be used.
In this case, the properties of the CustomAction
element in the elements.xml file are used for the configuration of the extension.
To summarize, the ClientSideInstance.xml file is used with tenant-wide deployment and the elements.xml file is used when apps are explicitly added to site collections.
For more information on tenant-wide deployment, see Tenant-wide Deployment of SharePoint Framework Extensions.