Power Platform is leading the way for developing low-code/no-code solutions in the
space of Microsoft O365 and Dynamics 365. It provides the tools to enable
high-speed development of a solution that fulfils business requirements which
means the developers can spend more time to plan on how the developed solutions
can be efficiently managed and deployed in various environments. In this blog,
we will take a look at the high-level steps on how to approach Power Platform
Solution Development and how to efficiently deploy it in various environments
along with some Pro-tips which can help in developing any solution using Power
Platform.

Power Platform Development -> Deployment Process


Plan for the Development, Test & Production environments

The first step in the development journey is to set up a power platform environment which
is basically a space to store, manage, and share your organization's business data,
apps, and flows. It also serves as a container to separate apps that might have
different roles, security requirements, or target audiences.

The solution which you are developing in the Power platform will most likely be
deployed in various environments starting from development -> test ->
Production. It is always beneficial to identify the environments which will be
used for deploying the solution and to preconfigure them in advance. One
important thing to know is whether there will be a DataVerse instance required
for the solution because you need to include it at the time of creating
environment and it also includes additional licensing cost,

Create an Un-Managed Solution in Development Environment

Unmanaged solutions are used in development environments while you make changes to your
application. Unmanaged solutions can be exported either as unmanaged or
managed. Unmanaged solutions act as the source for all the Power Platform
assets.

It is important that you create an unmanaged solution first before you develop
anything in the Power Platform. You can consider it as a starting point of your
development. Once a solution is created, then you can add various components
like PowerApps, Power Automate flow in it.

Setup Environment Variables and Connection References

Environment variables act as AppSettings in conventional web-based projects, It helps you
to change the values as you deploy your solution from one environment to
another. It will also help to manage the hardcoded values in one place and then
reuse them in all the solution components. Also make sure to create connection
references for any data connections created.

Pro tip: Make Sure to create environment variables for the data connections (if any)
in PowerApps as well as the configuration of actions in Power Automate Flows
and reuse them in all actions.

Develop Power platform Components

This is where you will go and create your components which may include Apps in
PowerApps, Flows in PowerAutomate flows, or Custom Dataverse entities. Just
make sure all the customizations are inside the Solution.

Pro tip: Make Sure to create connection references for each data connection you use in
PowerApps or each connection you create in PowerAutomate Flow.

Deploy a Managed Solution to Production

Managed solutions are used to deploy to any environment that isn't a development
environment for that solution. This includes test, UAT, SIT, and production
environments. Once the development is complete and you are ready to deploy it
to test/production, go to the solution and run the solution checker, and then
check the report to make sure all the components are configured properly. Now
your Unmanaged solution is ready, export it as a managed solution. This will
generate a zip file which you can then import into your production environment.

Pro tip: Set the Current value of All environment variables to reflect the value you want to use
in the Production environment. You should also have a service account ready with at least a
System Customizer Role which can be used to import the solution and then at the
time of import use it in the connection references as well.

Automating the Solution deployment via Azure DevOps  (Optional)

Thanks to newly introduced Microsoft Power Platform Build Tools tasks in Azure DevOps,
you can now configure build pipelines to automate the deployment of solutions.
For that you will first need to upload the solution file into Azure DevOps Repo
and then setup a build pipeline which will be triggered by uploading managed
solution in the repo and then will build the artefact. A release pipeline will
then deploy the managed solution artefact to the desired environment.

Summarize

In this blog, we covered the process for creating a solution that contains all the
project customizations from development to deployment in test/production environment.
You may have a complicated scenario that involves multiple solutions in which
case you must take care of solution dependencies as well so that the solution
is deployed in a way that if a solution has a dependency on another solution
then that solution gets deployed first. The Process along with the tips should
give you enough to set up your development plan for any power platform project.