If you have worked with Power Pages using the Enhanced Data Model, you know the pain of manually adding all the site components to a Dataverse solution. It's tedious, error-prone, and frankly, there are a lot of components to track down. You need to add the site record, the site languages, and then every individual component — Web Pages, Web Templates, Content Snippets, Site Settings, Table Permissions, Basic Forms, Advanced Forms, and more. Miss one and your deployment won't work as expected.
To solve this problem, we built an open source .NET console application called PowerPages.SolutionComponents.Console. This tool automates the entire process of discovering and adding all Power Pages site components to a Dataverse solution in one shot.
What Does It Do?
The tool connects directly to your Dataverse environment and does the following:
- Adds the Power Pages Site record to your solution.
- Finds and adds all related Power Page Site Languages.
- Finds and adds every Power Page Component associated with the site. This covers all component types including:
- Web Pages
- Web Files
- Web Templates
- Content Snippets
- Page Templates
- Site Settings
- Web Roles and Website Access records
- Basic Forms and Basic Form Metadata
- Advanced Forms, Steps, and Metadata
- Table Permissions
- Column Permission Profiles and Column Permissions
- Web Link Sets and Web Links
- Site Markers
- Redirects
- Shortcuts
- Cloud Flows
- Bot Consumers
- UX Components and Server Logic
- And more
Prerequisites
Before running the tool you will need the following:
- .NET 8.0 SDK or later installed on your machine.
- Access to your Power Platform environment with System Administrator or equivalent permissions.
- The Unique Name of the solution you want to add the components to (the internal name, not the display name).
- The GUID of your Power Pages site. You can find this in the Power Pages Management app or via the Power Platform CLI.
How to Use It
Using the tool is straightforward. Clone the repository, build it, and run it.
- Clone the repository from GitHub.
- Build the project:
dotnet build - Run the application:
dotnet run --project PowerPages.SolutionComponents.Console - Follow the interactive prompts. The tool will ask you for:
- Environment URL — Your Dataverse environment URL (e.g.,
https://yourorg.crm.dynamics.com). - Solution Unique Name — The internal unique name of your solution.
- Power Pages Site GUID — The GUID of the site whose components you want to add.
- Exclude Site Settings — Whether to skip certain site settings based on prefixes (more on this below).
- Environment URL — Your Dataverse environment URL (e.g.,
When you first run the tool, the Microsoft.PowerPlatform.Dataverse.Client library will open a browser window for interactive authentication. Once authenticated, the tool does the rest automatically.
The Exclude Site Settings Feature
A particularly useful feature is the ability to exclude specific site settings from being added to the solution. This is particularly helpful when you are deploying across environments that have different identity providers. For example, you probably don't want the Authentication/* settings from a development environment getting pushed into production and overwriting the production identity provider configuration.
By default, the tool excludes any site setting with the Authentication/ prefix when you opt in to the exclusion option. You can customize this list by editing the ExcludedSiteSettingPrefixes list in PowerPages.SolutionComponents.Console\Constants\ExcludedSettings.cs before building.
One Thing to Be Aware Of
The tool automatically adds the related Dataverse tables to the solution as part of the process. If your deployment strategy only requires the Power Pages Site, Components, and Languages to be in the solution — and not the full table definitions — you will need to manually remove the table definitions from the solution after the tool finishes running. This is a known consideration and is called out in the README on the GitHub project.
Get the Code
The project is 100% open source. You can find the full source code, clone the repository, or contribute at the link below.
https://github.com/JamesStuder/PowerPages.SolutionComponents.Console
If the tool proves useful or any issues are encountered, feel free to open an issue or submit a pull request on GitHub.
Comments
Post a Comment