WaelHamze / dyn365-ce-vsts-tasks

VSTS Extension for Dynamics 365 Customer Engagement
https://marketplace.visualstudio.com/items?itemName=WaelHamze.xrm-ci-framework-build-tasks
GNU General Public License v3.0
117 stars 56 forks source link

Merging solutions #98

Open KiranVKumar opened 5 years ago

KiranVKumar commented 5 years ago

How can I merge multiple (unmanaged) solutions into a single solution and deploy the single solution into the target instance.

WaelHamze commented 5 years ago

@skyovi you could try to use the "Copy Solution Components" task to copy the components from all solutions into the solution you want to export.

tdahnert commented 4 years ago

@WaelHamze ,

Correct me if i'm wrong, but the copy solution components doesn't have the ability to merge changes if the target solution already contains the components. This was an issue when I was trying to merge changes to some sub-components, without impacting other subcomponents that were in the target system. The way I got around this was by using a seperate development and staging environment. We have a shared dev environment. When a dev is ready to promote their changes they add only the subcomponents they want to merge and then kick off a powershell task (based on your commandlets) that performs the following steps.

  1. Creates a new unmanaged patch in development.
  2. Adds the subcomponents from the developers personal solution to the empty unmanaged patch.
  3. exports/Imports the patch to a separate "Staging" environment.
  4. Clones the solution in the staging environment to merge the patch into the master solution.
  5. Several cleanup tasks to remove patches and synchronize versions.

We are using this process to allow us to selectively promote changes from dev to staging where it is then unpacked and sent to source control, but a similar process could be used for @skyovi 's requirement. I'm curious if anyone thinks it's overkill and has a simpler way to selectively merge solutions.