Power Platform Hack: Turning a Managed solution into Unmanaged
Fernanda Ek
Posted on June 25, 2024
Hey folks! đ Iâve got quite a story to share about a little sweaty moment I had with Power Platform. If youâve ever had a situation where you needed to convert a managed solution into an unmanaged one, keep reading⊠Iâve got a trick for you.
How it all started: Importing
So there I was, trying to import a solution back into my Power Platform environment. I got this error:
"The import solution must have a higher version than the existing solution it is upgrading."
Honestly, I wasnât sure how to fix it đ”âđ«
The Discovery
Not one to give up easily, I decided to dig into the solution file itself. I unzipped the solution and opened the solution.xml
file. This file contains all the details of your solution. Hereâs a peek at the code:
<ImportExportXml version="9.2.24052.196" SolutionPackageVersion="9.2" languagecode="1033" generatedBy="CrmLive" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SolutionManifest>
<UniqueName>QMS</UniqueName>
<LocalizedNames>
<LocalizedName description="QMS" languagecode="1033" />
</LocalizedNames>
<Descriptions />
<Version>1.0.0.4</Version>
<Managed>0</Managed>
<Publisher>
<UniqueName>xxxxxxxxx</UniqueName>
<LocalizedNames>
<LocalizedName description="xxxxx" languagecode="1033" />
</LocalizedNames>
<Descriptions />
<!-- Other tags omitted for brevity -->
</Publisher>
<RootComponents>
<!-- Components list -->
</RootComponents>
<MissingDependencies />
</SolutionManifest>
</ImportExportXml>
I noticed the <Version>
tag and thought, âWhat if I just bump up the version number?â So, I changed <Version>1.0.0.4</Version>
to something higher, like <Version>1.0.0.7</Version>
, saved the file, zipped it back up, and tried importing it again. Success! đ
The âEurekaâ moment with <Managed>
While I was poking around, another tag caught my eye: <Managed>
. It was set to 0
, which means it was an unmanaged solution.
Note: In the context of many programming languages, 0 and 1 are used as Boolean values to represent false and true, respectively.
Curious, I wondered what would happen if it was a managed solution, if it was set to 1
đ€ Then I decided to test it out with a managed solution⊠I changed it to 0
.
âą 1: This means the solution is managed. Managed solutions are typically used in production environments where you donât want users to modify the solution directly. The 1 here is like saying âYes, this is managed.â
âą 0: This changes the solution to unmanaged. Unmanaged solutions are often used in development environments because they allow for direct modifications. The 0 here is like saying âNo, this is not managed.â
So, by changing the tag from 1 to 0, youâre effectively telling Power Platform that the solution should no longer be treated as a managed solution, allowing you to edit and customize it freely.
So, I did just that:
<Managed>0</Managed>
I saved the file again, zipped it up, and imported it back into my environment. And guess what? The solution was now imported as an unmanaged solution! đ
Hereâs how to do it
-
Unzip and Edit:
- Unzip the exported file and open
solution.xml
. - Change the
<Managed>
tag from1
to0
.
- Unzip the exported file and open
If youâre facing a version issue, update the <Version>
tag to a higher number.
I find it easier opening it directly in Visual Studio Code, you can of course open with notepad as well.
-
Zip and Import:
- Zip up the files and import the solution back into your environment.
VoilĂ ! You now have an unmanaged solution.
When to use this trick
Managed solutions are great for deploying stable versions to production environments but if you ever need to modify something or if youâve somehow lost your unmanaged version and need to make changes, this little trick can save you tons of time.
Conclusion
While this trick works, itâs more of a workaround than an official method. Use it wisely and always keep backups of your solutions. Also, keep in mind that this might not be suitable for all scenarios, especially in production environments where stability is key.
I hope this helps you out as much as it did for me đ
Posted on June 25, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.