Exercise - Use source code to create an app and install tools
In this exercise scenario, you have been asked to create an account management app for your organization. One development requirement within your organization is for the source of any in-house app to be available in text format. This requirement allows the company to perform an automatic scan of the source code for potential copyright infringement.
You decided to create a canvas app and to make the app source available in text format.
Requirement
To complete this exercise, make sure that you have a Microsoft Dataverse environment with database installed.
Objectives
The goals for this exercise are for you to learn how to:
Create a canvas application and download it to your computer.
Install the Power Platform extension for Visual Studio Code.
Unpack a canvas application in Visual Studio Code.
Exercise 1: Create an app
In this exercise, you'll create an account management canvas application and save it to your local machine.
Task: Create an application
In this task, you'll create an application and save it to your local machine.
Go to Power Apps maker portal, sign in, and then select the environment that you want to use for this lab.
Select Create > Dataverse.
Create a New connection or select an existing connection.
Select the Accounts table and then select Connect.
Once the app is created, select the arrow beside the Save icon at the top-right of your screen, select Download a copy.
Select Download.
Create a new folder on your computer and name it Learn lab account manager.
Move the downloaded app to the folder that you created.
Exercise 2: Install tools and unpack
In this exercise, you'll install Visual Studio Code, install the Power Platform extension for Visual Studio, and then unpack the canvas application.
Task: Install tools
In this task, you'll install Visual Studio Code.
Go to Download Visual Studio Code - Mac, Linux, Windows, and then select the download for your platform.
Follow prompts to install Visual Studio Code.
Start Visual Studio Code after installation completes.
Select the View menu and then select Extensions. Search for and select Power Platform.
Select Install and then wait for the installation to complete.
Select the File menu and then select Open Folder.
Select the Learn lab account manager folder that you created previously.
Select the Terminal menu and then select New Terminal.
Run the following command to unpack the Account manager application.
pac canvas unpack --msapp "Account manager.msapp" --sources src
The unpack process should succeed. Expand the src folder that was created.
Expand each folder inside the src folder and then examine the content of each.