{"id":12972,"date":"2021-01-14T17:00:40","date_gmt":"2021-01-15T01:00:40","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-apps\/source-code-files-for-canvas-apps\/"},"modified":"2025-06-11T07:55:58","modified_gmt":"2025-06-11T14:55:58","slug":"source-code-files-for-canvas-apps","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-apps\/source-code-files-for-canvas-apps\/","title":{"rendered":"Source code files for Canvas apps"},"content":{"rendered":"

Imagine using GitHub with a Canvas app.\u00a0 And I mean using GitHub as it was meant to be used, with text diffs between versions, and not just storing opaque .msapp blobs.\u00a0 \u00a0Teams can collaborate on apps: they can work on private branches, diff changes, create pull requests for review, and merge into master.<\/p>\n

Imagine using Visual Studio Code with a Canvas app, a full screen editor with search and replace.<\/p>\n

We are very pleased to announce the experimental release of a tool that enables these modern miracles.\u00a0 It is but the first step as we make application lifecycle management easier for formulas and Canvas apps.<\/p>\n

To illustrate, in this short video we will change the Icon property of an Icon control with these steps:<\/p>\n

    \n
  1. Export an app as an .msapp file with Save As<\/strong>.<\/li>\n
  2. Unpack the .msapp to individual source files using our new tool.<\/li>\n
  3. Make a simple change to a formula using Visual Studio Code.<\/li>\n
  4. Pack the modified source files back into an .msapp file.<\/li>\n
  5. Open the modified .msapp file in Studio and see the result of my change.<\/li>\n<\/ol>\n

    \"\"<\/p>\n

    This new tool enables the source code of a Canvas app to be effectively managed in GitHub or Azure DevOps.\u00a0 Diffs, pull requests, and comments can be based on lines of formula text rather than .msapp blob files.<\/p>\n

    In this next example, we’ll make the same change to the Canvas app stored in GitHub as text source code files.\u00a0 We’ll go through all the steps required to manage the change, have it reviewed, commented on, merged in to master, and the result tested.<\/p>\n

    \"\"<\/p>\n

    We’ll work with this GitHub repo in Visual Studio Code.\u00a0 First we’ll create a new branch, make modifications there (change the icon from “Person” to “People”), and push the changes to our new branch on GitHub.<\/p>\n

    \"\"<\/p>\n

    Back on GitHub, we’ll create a pull request for this new branch to merge into master.\u00a0 We’ll have an opportunity to review the one line change, to comment on the change, and to approve the merge.\u00a0 Canvas apps become a part of your existing application lifecycle management workflow.<\/p>\n

    \"\"<\/p>\n

    And after the merge has been made, we sync changes back to our client and recreate the .msapp file.\u00a0 We can now load the file into Power Apps Studio and see our change.<\/p>\n

    \"\"<\/p>\n

    Excited?\u00a0 These examples only scratches the surface of what is possible.\u00a0 By supporting text files, all the tools that you love and all the unique workflows that you have created can now be used with Canvas apps too.<\/p>\n

    Limitations<\/h2>\n

    But before you get too excited, let’s reiterate that this is experimental.\u00a0 We are making this available now for your feedback and to find issues.<\/p>\n

    Please do not convert all your .msapp files to source files and throw away the originals.\u00a0 We are working toward a day when you can do this, but that is not today.\u00a0 \u00a0By far, Power Apps Studio is still the best place to edit a Canvas app.\u00a0 We are introducing a new way to manage and edit Canvas apps, a companion to Studio, not a replacement.<\/p>\n

    There are some known limitations and gotchas:<\/p>\n