OK, I have opened multiple MS tickets with this, tried to fix it a hundred different ways - and regardless of what I do, I end up with similar issues. The real crux of the issue is that the legacy CRM import and the "New" Power Apps import, seem to behave differently, thus, giving me different results in CI/CD (which seemingly uses the PowerApps API), when compared to importing a solution manually into CRM's legacy interface.
The Issue:
When using DevOps CI/CD to import a MANAGED solution, which contains elements that already exist in the TARGET environment as unmanaged, DevOps fails, as such:
Solution import Failed. Error: A managed solution cannot overwrite the Relationship component 'acms_caseweight_pcx_case_caseweight' with Id=b56724cc-3730-4dc5-ac3f-358cddb8fda5 which has an unmanaged base instance. The most likely scenario for this error is that an unmanaged solution has installed a new unmanaged Relationship component on the target system, and now a managed solution from the same publisher is trying to install that same Relationship component as managed. This will cause an invalid layering of solutions on the target system and is not allowed.
When I push the exact some solution up through CRM's Import Solution mechanism, it works without failure. Here's the rub on that one;
When importing via CRM, this is the WARNING message you get upon an import in this scenario (convert unmanaged components to managed):
When Importing via PowerApps/CICD, you are given an ERROR, and when clicking the link in Solution History, given conflicting advice
So, what gives, Microsoft? Which way are we going to be able to do this in the future? I have been working in Dynamics for over a decade, and have always EXPECTED the Unmanaged components to be converted - and that is how we run our deployments every single time.
As for the secondary issue....
It appears that solution upgrades sent through CI/CD are not processing effectively. Here's a simple example that I ran into over the past few days:
I have an UNMANAGED solution in my DEV environment, we'll call it CORE. CORE had a managed field in it, which I removed from the UNMANAGED solution, and pushed out to my other environments over CICD. The solution imported successfully, and the release in DevOps was also branded 'success'. However, when I go to the target environment, the field is still in the solution. It appears my Solution Upgrades are being ignored. The resolution? MANUALLY import it, using the CRM legacy interface, choose "Upgrade/ Overwrite" (which is what I have set in CICD configs). Solution imports fine, and component is deleted.
Why would this be the case? Here are the configs of my import:
So, in the end, this MAY be two separate issues, or may not be. They are both related to the way Power Apps and DevOps/CICD handle Imports of CRM solutions, and the lack of faith I have in how this is actually working. Please help - glad to provide additional details and screenshots as needed.
(upfront disclosure: @frick-brian and I know each other)
So, it seems like we have two issues here, and each of them you've already run mostly to ground:
1. The PA import does not behave the same as the Classic import, and specifically when you try to bring in a managed solution component to overwrite an unmanaged one, it returns a failure rather than a warning.
2. The PA import does not seem to give you a subtractive (or Upgrade) solution migration so when you try to extract a managed component from your release, it does not remove it from downstream systems.
I believe both of these are as-designed for the PA import process (as disappointing as that might seem) but there are efforts underway to release better tooling for PA imports. In the meantime, have you tried using the package deployer tool to push your solutions? That tool will let you specify your Upgrade, Maintain (RunSolutionUpgradeMigrationStep)/ Upgrade, Overwrite (overwriteunmanagedcustomizations) desired behavior and the packages should be readily deployable from DevOps. Unfortunately it adds steps to your deployment (preparing the package) but the PowerApps CLI is introducing support for Packages and might have just enough tooling for you. Suggest you take a look here.
WarrenBelz
85
Most Valuable Professional
Michael E. Gernaey
57
Super User 2025 Season 1
mmbr1606
55
Super User 2025 Season 1