Mastering ALM (Application LifeCycle Management) for Microsoft Power Platform: A Comprehensive Guide (Part 3 - working with...
Published: 2023-11-04 08:22:38

---
title: Mastering ALM (Application LifeCycle Management) for Microsoft Power Platform: A Comprehensive Guide (Part 3 - working with...
published: true
date: 2023-11-04 07:29:43 UTC
tags: 
canonical_url: https://the.cognitiveservices.ninja/mastering-alm-application-lifecycle-management-for-microsoft-power-platform-a-comprehensive-guide-part-3-working-with-solutions
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/plvzkqryq0k3cus753v5.jpg
---
Photo by <a href="https://unsplash.com/@hdbernd?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Bernd 📷 Dittrich</a> on <a href="https://unsplash.com/photos/orange-and-black-industrial-machine-T_wUlbOM8ck?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Unsplash</a>
  
> This is the third part of a series of articles, [part 1 (basics and background](https://the.cognitiveservices.ninja/mastering-alm-application-lifecycle-management-for-microsoft-power-platform-a-comprehensive-guide-part-1-the-basics) & [part 2 (preparing your environments)](https://the.cognitiveservices.ninja/mastering-alm-application-lifecycle-management-for-microsoft-power-platform-a-comprehensive-guide-part-2-environment-setup) were published before.

**Solutions** are a key feature of Power Platform that allows users to transport apps, bots, and components from one environment to another or apply customizations to existing apps.

Here are some benefits of working with solutions in Power Platform:

- Application Lifecycle Management (ALM): Solutions serve as the mechanism for implementing ALM in Power Platform and other related products, such as Power Automate. They facilitate the management of an app's lifecycle by providing a means to create, update, upgrade, and patch a solution.

- Customization Management: Solutions enable you to manage your customizations in an organized manner. You can create a solution and perform all your customizations within it. Then, you can effortlessly distribute your solution to other environments.

- Managed Properties: By utilizing managed properties, you can control which components of your managed solution are customizable. This helps safeguard your solution from modifications that might cause it to malfunction after being imported into another environment, such as testing or production.

- Ease of Deployment: Solutions decrease the initial investments required for traditional enterprise software development. They also reduce the range of resources and skills necessary for deployment.

## Idea behind

Instead of working on your application in your production environment (`prod`), we create a development environment (`dev`), import the solution file to it, work on it, and test the outcome. Every developer is responsible for their own outcome. We create a new branch in the repository, export the modified solution to it, create a pull request, and merge it after testing again in a test environment (`test`). Finally, we deploy it to your production environment (`prod`).

Create a new solution

- Go to [make.powerapps.com](http://make.powerapps.com)

- Select your Development Environment `dev` (top right)

- Choose "solutions" and then "+new Solution"

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697974011714/d9fe797b-cdf7-4a22-b962-5d8c4787fff0.png)
    
- give it a meaningful full name and hit "create"

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697974102219/a312904c-5724-4054-b3d6-a6ef83f4e599.png)

- Open the new solution and add all components associated with the project.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697974581318/b0a64905-bd05-4942-bcb9-a547c8b1f672.png)

(in this case, we have created a solution with a basic Power Virtual Agents bot)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697974671523/00f90c2b-135e-4846-8d21-d4a335178a0f.png)

## Initial export of the solution

> Remember, we are beginning with a lightweight approach. Later, we will replace this with pipelines and, for example, GitHub Actions.

- Go to your codespace on GitHub (see part 2 of this series) and open the terminal

- List all your environments

```
pac org list

```

- and select the Development Environment `dev`

```
pac org select --environment <Unique Name>

```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697975279323/5f91126a-31a8-4a87-b2e3-2fbfcf3a5c30.png)

- list all your solutions within the environment

```
pac solution list

```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697975411765/b03305fc-ebfe-46bf-a1f9-139acb9f579f.png)

- create a new path in your repository and export the solution you created in the step before

```
mkdir Solutions
```

```
pac solution export --name <name of solution> --path Solutions
```


![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697975780591/d5afec8d-0579-4471-840d-9c10f5cf20dc.png)

- unpack the solution

```
pac solution unpack --zipfile 'Solutions/demosolution_for_article.zip' --folder 'Solutions/demosolution'
```

- find a result similar to the screenshot in your codespace

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697976217465/f1cc8fda-74d1-4b93-8f99-3bc2d329b1ba.png)

- commit your code to the repository
- click on the source control icon on the left
- enter a meaningful commit message, hit "commit" and sync

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697976393752/a18ca8d1-42ae-4fa9-9d41-1b9af3775caf.png)

- Find your first commit in your repository on GitHub.
![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697976870402/200c81c9-b9a3-4e88-80b5-56eaac6ff4c9.png)

## Create a new branch, export a change, and create a pull request

After working on your solution, create a new branch in your codespace.  
Do not forget to add your changes to the solution, e.g right click on your bot and select "advanced" and "+Add required objects"

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697982941005/c3020671-a43c-458c-85e4-f3eb6e573dbd.png)

- click on "main" in the status line

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697982265474/a6882926-e537-46f4-a208-8a12f285c91d.png)

- click on "+ Create new branch"
![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697982341414/96f9043a-1b22-426b-97fc-30ee696d7340.png)
- please give it a meaningful name and export your solution.  

```
pac solution export --name 'demosolution_for_article' --path Solutions --overwrite
```
- and unpack
    
```
pac solution unpack --zipfile 'Solutions/demosolution_for_article.zip' --folder 'Solutions/demosolution'
```

- find your changes in the source control menu, give your commit a name, and commit

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697982722809/93abf473-02ee-4b09-b34a-c3092514eff9.png)

- create a new pull request via codespaces vscode web.
- select the GitHub icon on the left,
- click on the "Create Pull Request" ico

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697983674885/bc6657e6-6e48-4c01-bdcf-eef9a6f75906.png)

- Give your PR a meaningful name and describe it to assist the repository maintainer in deciding to merge the PR.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697983871885/f632f621-263f-48b9-a837-471badc22abf.png)

- the maintainer will then see the PR and can decide whether to merge or not

## Additional Tasks

importing a solution file from the repository to an environment  
`pac solution import --path Solutions/demosolution_for_article.zip`

clone a solution (export and unpack) in one step  
`pac solution clone --name 'demosolution_for_article.zi'p --outputDirectory 'Solutions/cloned-demosolution'`

publish a solution  
`pac solution publish`

please find the complete documentation on the [Microsoft Learn page](https://learn.microsoft.com/en-us/power-platform/developer/cli/introduction)

## Next step

In the following article of this series, we will accomplish the same tasks using GitHub Actions to eliminate the manual steps.

## Conclusion

Solutions in Power Platform play a crucial role in Application Lifecycle Management, customization management, and deployment. By following the steps detailed in this article, you can effectively create, export, and manage solutions in your development environment. As you progress, you can further automate these tasks using tools like GitHub Actions to streamline your workflow and enhance productivity.