Not sure if this ever happened to you, but it happened to me!
I accidentally reset my Development Environment, which is a Sandbox Environment, and lost one of my Unmanaged Solutions, one that I really couldn’t afford to lose.
Simple oversight on my part, but what could I do?
Thankfully, I still had a copy of the Managed Solution in my Downloads folder!
That begged the question, is it possible to convert a Managed Solution to an Unmanaged Solution? Yes, you can, and thanks to this article Converting a Managed Solution to Unmanaged in Power Platform – rakhesh.com, I was able to do it!
Here is how I did it!
I located the Managed Solution in my Downloads folders and double clicked it to view the contents.
Note, I did not extract the files! If you do this, and make the changes outline below, and then zip the file back up and try to upload it, you will get an error!
Continuing.
I right clicked on the solution.xml
file in the Downloads folder and clicked Copy.
I navigated back to the Downloads folder, can be any folder, and then right click and select the Paste icon, which then pastes in a copy of the solution.xml
file.
I opened the solution.xml
in Notepad, can really be any text editor.
In the solution.xml
file I located the text <Managed>1</Managed>
and replaced the 1
with a 0
, and then clicked Save.
I navigated back to my Downloads folder, right clicked on the solution.xml
file and clicked the Copy icon.
I navigate back to the contents of the Managed Solution zipped file, in my case, it was called Sample1Solution_1_0_0_2_managed.zip
, again, this can be done by double clicking the Managed Solution.
I right clicked in the window, selected the Paste icon, and when prompted, clicked Copy and Replace.
Now I am ready to import the Solution back into my Development Environment.
I navigated to my Development Environment, clicked on Solutions, and then clicked on Import Solution.
I selected my Solution from the Downloads directory and clicked Next.
I clicked Import to start the import process.
After a few minutes, the Solution successfully imported, and I encountered no issues working with it!
Some additional takeaways.
When moving your Solution from one Environment to another, always export BOTH a Managed and Unmanaged version of the Solution, and then store it in either a file repository, like OneDrive, or a source code repository, like Azure DevOps or GitHub.
Now you can sleep easy at night, knowing you’ll always have a copy of both versions of the Solution should you ever need them.
Be cautious using Sandbox environments for Development, as they can be easily reset, I prefer to keep my Development environments as Production.
An additional perk with having your Development environment be a Production environment is you won’t be bothered with the subtle differences between a Production and Sandbox environment and your testing will be more reflective of how your Solution will act in other environments.
What if you don’t have a copy of the Managed Solution? I think you are out of luck; I can’t find any guidance on how to export or download a Managed Solution.
Thanks!
Update
Thanks to Casey Burke for sharing the following:
Modifying the solution like this is not supported by Microsoft, but there’s good advice on backing up your solutions (you can also use pipelines which backs up both managed and unmanaged versions automatically).
To explain, modifying the managed vs unmanaged bool can get you into a corrupt state – some solution components have different formats when exported as managed vs unmanaged. While it might work with some solutions, it will fail or corrupt others and hence why Microsoft doesn’t support it – at least for now.
– Casey Burke, Principal Product Manager, Microsoft Power Apps
Discover more from Matt Ruma
Subscribe to get the latest posts sent to your email.