It is sometimes necessary to develop against a cloud sandbox, and you cannot publish an AppSource app to sandbox, manually or from VS Code.
So, you have to use custom range to develop in, but you don't want to have it as part of the final product.
(sorry for pasting code like this, using a code block says "We have encounter some malicious input. Please remove that and try again")
#if LOCALONLY
pageextension 84020 "PurchaseOrders BTR" extends "Purchase Orders"
#else
pageextension 72607036 "PurchaseOrders BTR" extends "Purchase Orders"
#endif
However, now you have to manage multiple manifests, which is not ideal.
What would be nice is if one could use preprocessors in the manifest to keep the repo cleaner.
It does propose a chicken-and-egg problem, because you have to read the manifest for a property that might be surrounded by a preprocessor. Though, the default should be as if there aren't any preprocessors (always using the #if not xyz, or outside preprocessors).
#if LOCALONLY
"id": "00000000-0000-0000-0000-00000000000a",
"name": "AppName - InternalBuild",
"publisher": "Name",
"version": "26.0.0.0",
"idRanges": [
{
"from": 84000,
"to": 84199
}
],
#else
"id": "00000000-0000-0000-0000-00000000000b",
"name": "AppName",
"publisher": "Name",
"version": "26.0.0.0",
"idRanges": [
{
"from": 72607001,
"to": 72607574
}
],
#endif
Alternative to this could be to manage "child" manifests, that can be defined by some name (preprocessor name?) - which allows you to make multiply child manifest copies, with a subset of configs. The child configs are activated by the relevant preprocessor name.
Kind Regards,
Ewald
