Sitemap

Stop Deploying Blind: How I Built an Intelligent ALM Tool for Microsoft Dataverse

7 min readJun 21, 2026

--

Introducing Solution Deployment Advisor — the XrmToolBox plugin that replaces deployment guesswork with data-driven confidence

By Osama Mahmoud

Every Dataverse developer has felt it — that uncomfortable knot in the stomach just before clicking “Import Solution” in a production environment. You’ve tested in Dev. You’ve tested in UAT. But you still don’t know with certainty what the target environment looks like right now. Has someone made manual changes directly in Prod? Which solution layers are blocking your deployment? Will your version number conflict with an existing patch?

Most teams answer these questions by doing nothing — they deploy, cross their fingers, and deal with whatever breaks.

Solution Deployment Advisor was built to make that knot disappear.

The Problem with Dataverse Deployments

Dataverse solution management is deceptively complex. On the surface, it looks straightforward: export a managed solution, import it into the next environment, done. But in any real enterprise project, the reality is messier.

Solutions accumulate components over time. Multiple developers work on the same base solution. Patches get stacked on patches. Someone customizes a form directly in production because there was an urgent fix. Then your next deployment arrives, and suddenly you’re dealing with layer conflicts you never anticipated.

The questions that should be answered before deployment — what components are new, what already exists in the target, what risk does each component carry, which version number won’t cause a Dataverse API rejection — are typically answered after something goes wrong.

This is the gap Solution Deployment Advisor fills.

What the Tool Does

Solution Deployment Advisor is an XrmToolBox plugin built in C# on .NET Framework 4.6.2. It connects simultaneously to your source (Dev) and target (UAT, QA, or Production) environments, analyzes every component in a selected solution, and presents a clear picture of your deployment before you create a single patch.

At a high level it does five things:

Cross-environment layer analysis. The tool queries the msdyn_componentlayer table in the target environment to understand exactly what is already deployed and which solution layers each component belongs to. It then compares this against what is in your source solution, component by component.

Lifecycle classification. Every component in the analysis grid is labeled as New (doesn’t exist in target), Updated (exists but source has newer changes), or Unchanged (environments are in sync). You see the full picture before anything moves.

Risk scoring. Not all components carry the same deployment risk. Deleting or modifying a Table (Entity) or Security Role has far higher consequences than updating a Web Resource or Form. The engine applies a Red/Yellow/Green risk rating to every row, so your team can make informed decisions about what to include in a given deployment.

Intelligent patch generation. Rather than manually creating patches and dragging components in one by one through the Maker Portal, the tool provisions correctly versioned patches in the source environment and adds the analyzed components to them automatically. It groups components by their Split Strategy (Customization vs Process, or By Category) to produce clean, purposeful patches rather than monolithic blobs.

Version collision prevention. Dataverse will reject a patch import if the version number already exists or is lower than the highest active layer in the target. The tool’s Patch Decision Engine compares proposed versions against both environments and automatically bumps version numbers past any collision point before creating the patches.

The Architecture

The codebase is organized around a clean separation of concerns that makes it easy to extend.

SolutionDeploymentAdvisor/
├── Plugin.cs ← XrmToolBox entry point
├── UI/ ← WinForms controls
├── Models/ ← Plain data objects
├── Services/ ← Dataverse API wrappers
├── Components/ ← Per-type analyzers (IComponentAnalyzer)
└── Core/ ← Analysis, versioning, split engines

The heart of the system is the AnalysisEngine, which orchestrates the whole pipeline. It retrieves components via SolutionComponentService, resolves human-readable names through ComponentNameResolver (mapping type codes like 90 to "Plugin Assembly", 29 to "Cloud Flow", and so on across 14 component types), enriches each component via type-specific IComponentAnalyzer implementations, and scores risk through the static RiskEngine.

// The IComponentAnalyzer contract — implement once per component type
public interface IComponentAnalyzer
{
int ComponentType { get; }
ComponentInfo Analyze(ComponentInfo source, ComponentInfo? target);
}

Adding support for a new component type is exactly one step: create a class that implements this interface, set the type code, and register it in AnalysisEngine. The open/closed principle is properly applied throughout.

The VersionStrategyEngine makes decisions about semantic versioning based on the nature of the payload — a deletion or data schema change triggers a major increment, new components trigger a minor increment, and modifications alone trigger a patch increment. These are sensible defaults your team can discuss and override.

The User Workflow

Opening the plugin for the first time, the workflow is designed to be linear and self-explanatory.

Step 1 — Connect environments. The source environment is automatically the one you connected through XrmToolBox’s main connection manager. For the target, clicking “Select Target Env…” opens XrmToolBox’s native “All Connections” dialog — the same one you see in Data Transporter, FetchXML Builder, and other professional plugins. No URL boxes to fill in, no manual OAuth flows. Your existing saved connections appear immediately and you pick one.

Get Osamamahmoudrashed’s stories in your inbox

Join Medium for free to get updates from this writer.

Step 2 — Load and select solutions. Click Load next to the Source dropdown and the plugin retrieves all unmanaged solutions from your Dev environment, sorted alphabetically by friendly name. Select the one containing your planned deployment. The version label next to the dropdown shows you the current version at a glance.

Step 3 — Analyze. Click Analyze. The engine queries both environments in a background thread (using XrmToolBox’s WorkAsync pattern so the UI never freezes), resolves all component names, classifies lifecycle states, and scores risk. The grid populates with readable results: "Account Table", "Send Approval Email (Cloud Flow)", "Contact Form", rather than raw GUIDs.

Step 4 — Review. The summary bar shows the totals — “● High: 4 ● Medium: 12 ● Low: 38 Total: 54” — and the filter dropdown lets you drill into just the high-risk items, or just the new components, with a single click. Row colors immediately communicate risk. A version preview label at the bottom tells you what version the engine recommends and why.

Step 5 — Create. Clicking Create Solutions opens the confirmation dialog. Once confirmed, the tool runs the SolutionSplitEngine to group components, creates appropriately versioned patches in the source environment via the Dataverse API, and reports the outcome.

Step 6 — Export. The Export CSV button writes every analyzed component — name, type, lifecycle, category, risk, and notes — to a spreadsheet ready for Change Approval Board documentation or deployment sign-off.

Why This Approach Matters for ALM

Application Lifecycle Management in the Power Platform ecosystem is a genuinely hard problem. Microsoft provides the tools — solutions, patches, managed layers, the Power Platform Build Tools — but it doesn’t provide the intelligence to use them correctly. That intelligence has to live somewhere, and traditionally it lives in the heads of senior architects.

Solution Deployment Advisor externalizes that intelligence into tooling that any developer on your team can use.

The risk scoring alone changes conversations. When a junior developer can see before deployment that modifying a Security Role is flagged High risk and needs explicit confirmation, you’ve just prevented a class of incidents without writing a policy document or scheduling a training session. The tool teaches through interaction.

The version collision prevention is similarly valuable. Dataverse’s error messages when version numbers conflict are notoriously cryptic. The time wasted diagnosing those errors — comparing patch trees manually, querying solution layers in Advanced Find, tracking down who deployed what and when — is eliminated when the tool resolves the conflict before the patch is even created.

Technical Decisions Worth Noting

A few design choices are worth highlighting for developers who want to understand the codebase or contribute extensions.

ComponentNameResolver maps 14 type codes. Rather than leaving GUIDs in the analysis grid (which is what raw Dataverse API responses give you), the resolver issues a targeted Retrieve call for each component against the correct entity — entity for tables, systemform for forms, workflow for flows, sdkmessageprocessingstep for plugin steps, and so on. The result is a grid that reads like a deployment manifest rather than a database dump.

Roadmap

The foundation is solid and the core workflow is production-ready. The areas planned for future releases reflect where enterprise ALM tooling can meaningfully go next:

Dependency impact analysis. Understanding not just what a component is, but what depends on it. Knowing that removing a field from a table will break three Cloud Flows and two Plugins is exactly the kind of pre-deployment insight that prevents outages.

Historical drift detection. Tracking component state over time to surface environments that have diverged silently — the production instance that someone configured directly six months ago and never documented.

Azure DevOps gate integration. Surfacing the risk score and analysis results as a pipeline gate, so a High-risk deployment requires explicit human approval before it can proceed in an automated release pipeline.

Install It Now

Solution Deployment Advisor is published on the official XrmToolBox Tool Library and can be installed in seconds — no manual file copying required.

  1. Open XrmToolBox and go to Tools → Tool Library.
  2. Search for Solution Deployment Advisor.
  3. Click Install. XrmToolBox handles the rest.

The plugin page is live at: https://www.xrmtoolbox.com/plugins/OsamaMahmoud.SolutionDeploymentAdvisor/

Once installed, connect to any Dataverse environment and the plugin appears immediately in your tools list. Connect a second environment as your target and you’re ready to run your first analysis.

Closing Thoughts

The Dataverse platform is powerful, and the solution framework is a thoughtful approach to change management. But the tooling around deployment has always assumed developers know more than they can reasonably be expected to know — which solution layers are active in production, which version numbers are safe to use, which components carry risk.

Solution Deployment Advisor doesn’t replace judgment. It informs it. It takes the information that was always theoretically available in the Dataverse API and surfaces it at exactly the moment a developer needs it: before they deploy, not after something breaks.

The goal was never to build a clever tool. It was to build a safe one.

Solution Deployment Advisor is developed and maintained by Osama Mahmoud. Install it from the XrmToolBox Tool Library: https://www.xrmtoolbox.com/plugins/OsamaMahmoud.SolutionDeploymentAdvisor/

--

--