scottdurow / SparkleXrm

An open-source library for building Dynamics CRM XRM solutions using Script#, jQuery & Knockoutjs.
MIT License
265 stars 197 forks source link

CheckIn Delta changes without removing old CheckIn code #462

Open AdiCRM opened 2 years ago

AdiCRM commented 2 years ago

We follow below steps:

1) We unpack deploy full solution using SparkleXRM unpack.bat. We check in the unpacked solution components into local branch in Azure DevOps repository. 2) Then we create a patch on a solution. Patch contains single component (say a JS file) that was already there in original solution. Hence, it is there in local branch also. 3) We unpack patch and check in the same JS into local branch. 4) We expect that it will update the original JS file in repository. Rather it deletes all the components checked in earlier and newly checks in the single JS file alone.

Query - Is there a way in SparkleXRM to unpack the patch and check in the delta changes without deleting existing components?

scottdurow commented 2 years ago

Hi @AdiCRM - thanks for the question and it's a very good one!

Microsoft don't recommend using solution patches in the way you describe for exactly the reason you give, making it hard to collaborate as a team.

"Using clone a patch and clone solution to update a solution isn't recommended because it limits team development and increases complexity when storing your solution in a source control system. For information about how to update a solution" (from https://docs.microsoft.com/en-us/power-platform/alm/update-solutions-alm#create-solution-patches)

If you want to use patches to deploy an update, you can manage your full solution in source control, deploy to a build server and then export the patch from there - you would see all the changes in source control, but the patch would just be a vehicle for deployment.

Hope this helps!