In Dynamics 365, managed solutions play a crucial role in deploying customizations and extensions across environments. However, managing solution versions can sometimes be challenging, especially when dealing with updates, dependencies, and compatibility issues.
Recently, while working on a solution update, we needed to clone the solution and provide it to the client. However, during this process, the default version was set to 9.1, and we mistakenly increased it to 9.1.0.31 instead of 9.0.1.31, as shown in the screenshot below.
When we tried to manually import the solution with the correct version number, a dialog box appeared with an error message stating the solution for upgrade must have a higher version number than the existing solution.
Since the solution contains dependencies, simply uninstalling it would result in data loss. Here’s how to fix the issue!
- Install the Power Platform CLI tools.
- Create a connection to the environment where the solution version is incorrect using “pac auth create.”
- Ensure this environment is selected before proceeding to the next step with “pac auth select“.
- Export the solution with the correct version number.
- Import the solution using the Power Platform CLI tools via “pac solutions import.”
Once the import process is complete, you can verify that the version has been corrected.
Conclusion:
We successfully resolved the version mismatch issue by downgrading the solution using CLI commands, ensuring that the customizations remained intact. If you encounter a similar scenario where the solution contains the same customizations as the one with the wrong version, you can follow the above-mentioned approach to resolve the issue effectively.