Does anyone have any input or idea on how to add PowerApps projects into a DevOps repo. I understand that PowerApps has it's own version control, but I was just wondering if there is a way to version control PowerApps codes into DevOps.
3 Answers
You can use the SolutionPackager tool to extract solution components.
Step 1: Export your solution using the Export-CrmSolution cmdlet
Export-CrmSolution -SolutionName "SolutionName" -Managed -SolutionZipFileName "SolutionName.zip"
Step 2: Extract the solution
SolutionPackager.exe /action:extract /folder:.\package /zipfile:"SolutionName.zip" /packagetype:Both /allowDelete:Yes /c
You can add these steps in a powershell script that execute from a Post-Build event in Visual Studio, similar to this:
if $(ConfigurationName) == Debug ( powershell.exe -ExecutionPolicy Bypass -File .\SolutionExport.ps1)
Once this is done you can commit to your repo.
For more details: https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/compress-extract-solution-file-solutionpackager
If you have the Powerapps codes, it is very easy to push it into a azure devops repo. You can follow below steps.
However, it would be hard for you to version control the PowerApp project, for its source code is complicated and not nice to read. Please check this thread for more information on Power Apps Community site.
1, create an empty repo from azure devops UI. Click Repos -> click the "+" beside the project name -> choose New repository. Check here for detailed steps.
Then uncheck Add a README
After you create your repo. You will get a guide to add the repo url to your local git repo
2, Then In the local directory for the PowerApps codes. Run below git commad to create a local repo for PowerApps codes. Check this thread for more information
#Then In the local directory for the PowerApps codes
git init
git remote add origin <URL for Azure Git repo>
git add .
git commit -m 'initial commit'
git push -u origin master
Then the powerapp codes will be pushed to azure git repo.


