cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

How to keep synchronized unmanaged solutions deployed in a sandbox environment and in a production environment

Hi,
 
I have implemented an unmanaged solution which contains custom entities in my sandbox environment. 
I have imported it in my production environment as unmanaged solution.
I have then deleted a field in of my custom entities in my sandbox environment and re-imported the solution in my production environment. The deleted field (from my sandbox environment) was still here in my production environment.
So, how can I keep synchronised my unmanaged solutions deployed in both environments.
 
Thanks, 
 
Arioule
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

No worries @Arioule, there are ways to fix this. I assume you environment is not too complex with not many customizations, apps and custom entities? Following are the key steps: 

  1. Instead of exporting unmanaged from Prod, I would take a copy of production environment to a new Dev environment. This will ensure the Prod and Dev are completely in sync and you don't forget anything. Here are the steps to copy:
    https://docs.microsoft.com/en-us/power-platform/admin/copy-environment#copy-an-environment-to-a-sand...
  2. In your new Dev environment, create a new solution and use the same publisher as you old unmanaged solution. Add all your custom entities (make sure to select "include all components"). For the out-of-the-box entities you modified, add only the sub-components such as the forms, views and custom fields instead of adding the whole entity.
  3. Delete all unmanaged solutions from your Prod environment. The components will stay in Prod and you won't lose anything. You can create a backup of the environment just in case: https://docs.microsoft.com/en-us/power-platform/admin/backup-restore-environments
  4. Export the new solution as managed and import into Prod. You'll should get a warning that the components will be converted to managed. This is what we want. After a successful import, you'll see your entity and other components converted to managed.
  5. For ongoing changes: here are a few pointers:
    1. Use the same solution (from step #2) and append the solution with the new/update components. Increase the version every time you export. If you're using make.powerapps.com then it will do it for you.
    2. Don't add full entities (include all components) for out-of-the-box entities, add only sub-component level changes for OOB entities: https://docs.microsoft.com/en-us/power-platform/alm/segmented-solutions-alm
    3. Use and export only one managed solution per Dev environment. If you need to build a new app or module, create a new Dev environment for that app and use another managed solution. This will help a lot to avoid dependencies.

 

More details on moving from unmanaged to managed: https://docs.microsoft.com/en-us/power-platform/alm/move-from-unmanaged-managed-alm.

 

I really suggest your go through and understand some of the Power Platform ALM concepts: https://docs.microsoft.com/en-us/power-platform/alm/

Hope this helps!

View solution in original post

6 REPLIES 6
Highlighted
Super User II
Super User II

Hi @Arioule,

This is by design with unmanaged solutions. Unmanaged solutions will never delete components whether it's forms, fields, entities, views, etc. You'll need to manually cleanup target environments from unwanted components. You can also script the delete/cleanup with PowerShell and CDS Cmdlets and tooling.

The recommendation is to use managed solutions when deploying to target environments (e.g. Test, UAT, Prod). With managed solutions components will automatically be removed if no dependencies exists. There are a few best practices however with Managed solutions to ensure you don't get into dependency issues. Here's a good starting point for managed solutions: 
https://docs.microsoft.com/en-us/power-platform/alm/solution-concepts-alm

https://docs.microsoft.com/en-us/power-platform/alm/update-solutions-alm

Power Platform ALM: https://docs.microsoft.com/en-us/power-platform/alm/

Hope this helps...

 

Highlighted

Hi @EricRegnier ,

 

Thanks a lot for your answer.

 

I read some articles on internet saying that deploying unmanaged solutions is the best option to go for in production (instead of managed solutions).

 

Is that right ?

 

Regards

 

 

Highlighted

There are pros and cons for both type of solutions. Managed solution has come a long way and Microsoft now clearly recommends managed solutions for non-dev like environments (Test, UAT, Prod, etc). Its official Power Platform ALM page states it at many occasions such as here: https://docs.microsoft.com/en-us/power-platform/alm/solution-concepts-alm#managed-and-unmanaged-solu...

My recommendation would be to go with managed solutions as well especially if you're starting a new project/app.

Hope this clarifies...

Highlighted

Hi @EricRegnier ,

 

I have done all wrong from the beginning.

In fact, I started implementing my solution in production environment and then I realised that I also needed a Dev environment. So I created a SandBox environment  and imported the solution from production as unmanaged solution. Since then, all changes have been made in Dev environment and have been exported in Prod on a regular basis as unmanaged solution.

 

Should I keep doing that or should I convert the unmanaged solution to a managed solution in Pro ?

Is "converting unmanaged solutions to managed solutions " an easy process ?

 

Thanks,

 

 

Highlighted

No worries @Arioule, there are ways to fix this. I assume you environment is not too complex with not many customizations, apps and custom entities? Following are the key steps: 

  1. Instead of exporting unmanaged from Prod, I would take a copy of production environment to a new Dev environment. This will ensure the Prod and Dev are completely in sync and you don't forget anything. Here are the steps to copy:
    https://docs.microsoft.com/en-us/power-platform/admin/copy-environment#copy-an-environment-to-a-sand...
  2. In your new Dev environment, create a new solution and use the same publisher as you old unmanaged solution. Add all your custom entities (make sure to select "include all components"). For the out-of-the-box entities you modified, add only the sub-components such as the forms, views and custom fields instead of adding the whole entity.
  3. Delete all unmanaged solutions from your Prod environment. The components will stay in Prod and you won't lose anything. You can create a backup of the environment just in case: https://docs.microsoft.com/en-us/power-platform/admin/backup-restore-environments
  4. Export the new solution as managed and import into Prod. You'll should get a warning that the components will be converted to managed. This is what we want. After a successful import, you'll see your entity and other components converted to managed.
  5. For ongoing changes: here are a few pointers:
    1. Use the same solution (from step #2) and append the solution with the new/update components. Increase the version every time you export. If you're using make.powerapps.com then it will do it for you.
    2. Don't add full entities (include all components) for out-of-the-box entities, add only sub-component level changes for OOB entities: https://docs.microsoft.com/en-us/power-platform/alm/segmented-solutions-alm
    3. Use and export only one managed solution per Dev environment. If you need to build a new app or module, create a new Dev environment for that app and use another managed solution. This will help a lot to avoid dependencies.

 

More details on moving from unmanaged to managed: https://docs.microsoft.com/en-us/power-platform/alm/move-from-unmanaged-managed-alm.

 

I really suggest your go through and understand some of the Power Platform ALM concepts: https://docs.microsoft.com/en-us/power-platform/alm/

Hope this helps!

View solution in original post

Highlighted

Thanks a lot @EricRegnier 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Users online (9,674)