Dataverse: How to fix Managed Solution Version Number

Let’s talk a bit about Solutions management. In my current company, we separate out the solutions based on the component types. So we have WebResources, Plugins, Customizations, etc. The benefits of this model are:

  • The changes are more trackable (if you are also check-in the solutions packager’s result)
  • If the changes are not related to the Form, Metadata, etc. The import time can be faster (we talk about the full solution).

But when we want to manage this way, there are downsides like a sequence of importing (usually WebResources first, followed by Plugins and the last one is Customizations).

Now, we go to the problem I encountered. Yesterday, I need to import manually the full WebResource solution to one of the environments. The problem is, I update the wrong version number which supposes to be 1.0.20230113.1 to 1.0.202230112.1 (typo). When we want to import manually, there is a confirmation dialog where it will show information regarding the type of the solution (Managed/Unmanaged), the version number, and also the publisher:

Wrong version number introduced because of typo and reckless action 😒

* As you can see, I’m still comfortable using the old UI which also caused the incident 🤣

But I just ignore those and proceed with the deployment (don’t be Temmy, please), and voila! I got a problem that I need to fix:

The problem

If you are trying to import the correct version number, then you will get the below stopper:

The solution being imported for upgrade must have a higher version number than the existing solution.

The error will be “The solution being imported for upgrade must have a higher version number than the existing solution.“. As the management of the solutions is like the one I explained above, I can’t simply uninstall (roll back) the solutions (because the Customizations solution has a dependency on the WebResources solution). So here is how I fixed it!

The solution

Again, the issue is not a big deal as it is just the version number. You can introduce a new version from 1.0.202230113.1 to 1.1.20230113.1 and it will work. If you already have automatic version numbering in your DevOps pipeline, changing the version number also is not that hard. But here is how I fixed it!

  1. You need to install Power Platform CLI tools.
  2. Create the connection to the Environment where the solution version is wrong using “pac auth create” (you also need to make sure this environment is selected before going to the next step “pac auth select“).
  3. Export the solution with the correct version number.
  4. Import the solution using Power Platform CLI tools via “pac solutions import
Result

Once the import process is done, you can verify, and yes! The version comes back to normal.

Happy CRM-ing!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.