3

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.

the.herbert
  • 289
  • 1
  • 5
  • 14

3 Answers3

3

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://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/compress-extract-solution-file-solutionpackager

0

I built a Power Automate Flow which will move your PowerApps Canvas apps to Github for version control. Its not perfect because the PowerApps "source code" has some strange features (such as a .jpg file with a dynamic name for every save!).

SeaDude
  • 3,725
  • 6
  • 31
  • 68
-3

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.

enter image description here

Then uncheck Add a README

enter image description here

After you create your repo. You will get a guide to add the repo url to your local git repo

enter image description here

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.

Levi Lu-MSFT
  • 27,483
  • 2
  • 31
  • 43