
Im checking if there is any way to automate the usage of patches. I see that we can clone a patch in the documentation. But how can we export it between environments?
https://learn.microsoft.com/en-us/power-platform/developer/cli/reference/solution
A patch solution is essentially the same as a normal solution in that you can perform all the same actions on exporting/importing a normal solution.
The two caveats when you are trying to build an ALM for patches are:
1. You need to Solution unique name (not the solution display name) when exporting a patch solution e.g. if you are using the MS provided ALM dev ops tasks for exporting and importing solutions
2. When importing the patch solution to a target environment, you need to ensure the original base managed solution from where you cloned the patch is installed in that environment, as a patch is just another layer installed above that existing managed solution that you can delete or rollup later on