Hello dear community members. I really need your help figuring out Power Apps / Power Automate Solution Packages work. I can't figure how to to generate a proper ZIP solution that is understood by the Power Platform during the import process.
What I am trying to do
I have an issue with the Step #4 - Zipping the solution files back to a solution file. To be more specific, the issue is in the step #5. When I generate a ZIP file programmatically, Step #5 fails. When I create a ZIP file manually (see screenshot below) - Step #5 succeeds.
Experiment A) If we manually create a solution file, then Step #5 works as expected: I can import a solution file with no issues:
Manually Zip solution file is imported perfectly fine:
Experiment B) However, I am trying to automate the entire process and do not want to manually ZIP anything. So, I am ZIPping the solution files using PowerShell:
As a result of running this PowerShell script, I get a ZIP solution file. It looks completely valid and I don't see any issues with it.
So, now, I am trying to import this solution file via https://make.powerapps.com/, but this time I get an error:
Solution "ContosoSolution" failed to import: Error while importing workflow {ed432f3c-6ee6-ea11-a817-000d3af41a7c} type ModernFlow name PowerApp -> Get items: Workflow import: Xaml file is missing from import zip file: FileName: /Workflows/PowerApp-Getitems-ED432F3C-6EE6-EA11-A817-000D3AF41A7C.json
This is what the solution import log contains:
According to the error, the solution ZIP file is missing a /Workflows/....json file. This error seems to be misleading, because the ZIP file does contain this file:
Question how can I generate a solution file programmatically in a way that can be properly read by the Power Platform during the import process? Why generating ZIP files manually works while programmatic generation causes an issue?
How to quickly replicate an issue
- Export solution package
- Unzip it
- ZIP it back using PowerShell:
[System.IO.Compression.ZipFile]::CreateFromDirectory($SourceDirectory, "PowerShell-Optinal-UTF8.zip",
[System.IO.Compression.CompressionLevel]::Fastest, $false, [System.Text.Encoding]::UTF8 )
- Import the ZIP Solution file
- Result: Get an error
More details
Hi Denis facing the same issue your code is working fine but I need to tweek the logic little bit can i specify the source and destination tar -a -c -f "Sample.zip" * in this code as of now I can able to specify the destination of the gzip to create but when I give source it is not working as expected please help
Two years late 🙂
But this works for me. Forward slashes causing the issue.
Awesome, thanks for sharing!
My friend Mark Doria found a solution to this issue:
- cd to the extracted Solution folder
- Run the following batch script:
tar -a -c -f "Sample.zip" *
The tar utility is a built-in Windows utility that creates ZIP files that Power platform does not complain about.
Heya @DenisMolodtsov - the article is a solution for manually editing an msapp file to convert it to landscape/portrait, not for re-packaging the standalone Power App (which is as you say, fairly easy to do), so not quite the same as your migrator which deals with sharepoint data sources (very neat solution btw, kudos!)
thanks for the shoutout @johnnyshield, hope you both have a great day
My apologies, I stumbled across this thread while trawling for PowerApps app packaging & didn't take the time to read it in detail. Thanks for setting me straight.
@johnnyshield , Thank you, very much for sharing. But unfrortunately @iAm_ManCat didn't solve it. The article that you shared here refers to standalone apps, not so-called Power platform solutions. Packaging Standalone apps and Flows using PowerShell poses no problem whatsoever. In fact, I "solved" this 4 years ago and published as an open sourse script here: https://github.com/Zerg00s/FlowPowerAppsMigrator. It does the same thing described in the article you shared, except it does the entire thing automatically, without manual maninupations.
My issue is with packaging Power Platform solutions. I tried everything under the sun to programmatically package Solutions and as a result, these zipped-up solutions simply are not accepted during the import procerure. On the other hand, standalone apps and flows that were packaged the same way have no issue whatsoever during the import. I hope it makes sense.
@iAm_ManCat has solved this - you can download his PowerShell tool here:
Converting a Landscape Power App to Portrait (and Vice Versa) - iAm_ManCat Blog (iammancat.dev)
Unfortunately, I didn't find a way to generate a ZIP file programmatically. I sill need help from someone who understands how ZIP works on a low level. I gave up after spending days over this issue.
Hi ! Have you found the solution ? I have the exact same problem ... And as for you, the answers here are not working.
(My computer system is in French regional settings, might have a relation to the issue and it's default encoding)
mmbr1606
39
Super User 2025 Season 1
MS.Ragavendar
32
DBO_DV
31
Super User 2025 Season 1