XrmToolSuite.DeploymentRiskAnalyzer 1.2026.7.11

dotnet add package XrmToolSuite.DeploymentRiskAnalyzer --version 1.2026.7.11
                    
NuGet\Install-Package XrmToolSuite.DeploymentRiskAnalyzer -Version 1.2026.7.11
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XrmToolSuite.DeploymentRiskAnalyzer" Version="1.2026.7.11" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XrmToolSuite.DeploymentRiskAnalyzer" Version="1.2026.7.11" />
                    
Directory.Packages.props
<PackageReference Include="XrmToolSuite.DeploymentRiskAnalyzer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add XrmToolSuite.DeploymentRiskAnalyzer --version 1.2026.7.11
                    
#r "nuget: XrmToolSuite.DeploymentRiskAnalyzer, 1.2026.7.11"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package XrmToolSuite.DeploymentRiskAnalyzer@1.2026.7.11
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=XrmToolSuite.DeploymentRiskAnalyzer&version=1.2026.7.11
                    
Install as a Cake Addin
#tool nuget:?package=XrmToolSuite.DeploymentRiskAnalyzer&version=1.2026.7.11
                    
Install as a Cake Tool

πŸ›‘ Deployment Risk Analyzer

An XrmToolBox plugin that analyzes a solution before deployment and produces a deployment-readiness risk report: a Low/Medium/High risk score, missing dependencies, schema conflicts against a target environment, environment-variable and connection-reference gaps, flow/plugin readiness, security coverage gaps, Power Pages readiness, and rollback guidance β€” exportable as a native PDF, an HTML dashboard, Excel, CI-friendly JSON, or a Markdown fix checklist.

Features

Analyzer What it checks
Solution Dependencies Missing required components (RetrieveMissingDependencies), prerequisite managed solutions, publisher prefix/option-value-prefix collisions, components duplicated across unmanaged solutions, unmanaged deployment warnings
Environment Variables & Connection References Definitions with no default/current value, secret variables (Key Vault) that must be configured per environment, values accidentally packaged into the solution, unbound/missing connection references in the target
Flows & Plugins Draft (OFF) cloud flows/processes, flows referencing non-existent connection references (parsed from clientdata), plugin steps with missing plugin types/assemblies, disabled steps, steps targeting tables absent from the target, duplicate SDK-step registrations (same type + overlapping filters on one event), and execution-rank conflicts (different types sharing a rank)
Security Impact New custom tables with no role coverage in the solution, secured columns without field security profiles, roles assigned to no user/team in the target
Data Model Conflicts (target required) Attribute type mismatches (import-breaking), string max-length reductions, choice value label conflicts and removed values, 1:N / N:N relationship schema-name collisions, solution version not incremented, managed/unmanaged mismatch
Deleted Components (target required) Components in the target's installed solution but absent from the source β€” deleted on a managed upgrade. Removed tables β†’ Critical (data loss), columns β†’ High, other components β†’ Medium; unmanaged target reported as informational drift
Power Pages Readiness Web role defaults (anonymous/authenticated), tables surfaced by basic forms/lists without table permissions, forms bypassing table permissions, web files without content, empty content snippets, baseline site settings, cache-refresh checklist. Supports both adx_ and mspp_ (enhanced data model) schemas

Risk score: Critical=25, High=12, Medium=5, Low=2 points, capped at 100. β‰₯40 (or any Critical) β†’ High, β‰₯15 β†’ Medium, else Low. Tunable in Scoring/RiskScoreCalculator.cs.

Exports

Five report formats, all from the Export toolbar button (available once an analysis has run):

Format What you get
PDF report (executive) A native PDF rendered directly with MigraDoc/PdfSharp (no browser needed) β€” a dashboard-style cover with a radial score gauge, colour-coded risk banner, risk-categories and recommendations tables, next-steps block, executive summary, and findings grouped by category. Fully unattended.
HTML report A self-contained, theme-aware (light/dark) dashboard: radial gauge, severity KPI cards, risk categories, top issues, recommendations, next steps, and full findings detail. No external CSS/JS/fonts β€” opens offline; Print β†’ Save as PDF in any browser is pixel-identical.
Excel workbook Summary / Findings / Fix Checklist worksheets for tracking remediation.
JSON (CI/CD) Machine-readable payload with ci.pass + suggestedExitCode for pipeline gating.
Fix checklist (Markdown) An ordered, actionable checklist that always ends with rollback guidance.

The native PDF and the HTML dashboard share the same derived data (risk-category scores, friendly category names) so both surfaces stay in sync. If an executive deployment summary has been generated (offline template or opt-in AI), it is embedded in the PDF, HTML, and JSON exports.

Help & Support

A Help button (right of the toolbar) opens a Help & Support dialog with:

  • Documentation β€” links to this README on GitHub
  • Report an issue β€” opens a new GitHub issue
  • Buy me a coffee β€” support future updates

The tool also implements IGitHubPlugin and IHelpPlugin, so XrmToolBox's own tool-menu links (repository, help) resolve to the same GitHub project.

Build

Prereqs: Visual Studio 2022 (or dotnet build with the .NET Framework 4.8 developer pack) on Windows.

git clone <your-repo>/XrmToolSuite
cd XrmToolSuite
dotnet build XrmToolSuite.sln -c Release
# or with local deploy to XrmToolBox:
dotnet build -p:DeployToXTB=true

The project targets net48 (XrmToolBox requirement) and references:

  • XrmToolBoxPackage β€” extensibility base classes + Dataverse SDK assemblies
  • Newtonsoft.Json β€” flow clientdata parsing and JSON export
  • ClosedXML β€” Excel export
  • PDFsharp-MigraDoc-GDI β€” native PDF export (GDI build: pure-managed, net48-compatible, no SkiaSharp natives)

A post-build step copies the DLL into %AppData%\MscrmTools\XrmToolBox\Plugins if that folder exists, so F5 debugging works (set XrmToolBox.exe as the debug launch target).

Install

  1. Build in Release, or download the compiled XrmToolSuite.DeploymentRiskAnalyzer.dll.
  2. Copy XrmToolSuite.DeploymentRiskAnalyzer.dll and its full export dependency chains into %AppData%\MscrmTools\XrmToolBox\Plugins β€” flat in the Plugins root, not a subfolder, or XrmToolBox silently drops the tool. Two chains ship next to the tool DLL: the Excel chain (ClosedXML + the OpenXml/SixLabors/System.* facade set) and the native-PDF chain (PdfSharp/MigraDoc GDI build, -gdi suffix). The complete DLL list and the reason it must sit next to the tool DLL are in Deployment_Guide_XrmToolBox.md (Step 2). Easiest path: dotnet build -p:DeployToXTB=true, which copies both chains for you.
  3. Restart XrmToolBox β†’ open Deployment Risk Analyzer.

To publish on the official Tool Library, follow MscrmTools' plugin submission process β€” this project implements IGitHubPlugin and IHelpPlugin (repository kkora/XrmToolSuite, help β†’ this README), configured in DeploymentRiskAnalyzerControl.cs.

Usage

  1. Connect to your source (dev) environment as usual.
  2. Click Load solutions, pick the solution to be deployed.
  3. (Recommended) Click Connect target env… and pick the destination (test/prod) connection β€” this unlocks schema-conflict checks, target env-var/connection-reference verification, version/downgrade detection, and role-assignment checks.
  4. Tick the analyzers you want, hit β–Ά Analyze.
  5. Review the grid (click a row for the full recommendation), then Export.

CI/CD gating example

Export JSON and gate a pipeline stage on it:

$r = Get-Content .\DeploymentRiskAnalyzer_MySolution.json | ConvertFrom-Json
if (-not $r.ci.pass) {
  Write-Error "Deployment Risk Analyzer risk = $($r.risk) (score $($r.score)). Blocking deployment."
  exit $r.ci.suggestedExitCode
}

(The UI tool produces the report; for fully headless runs, the analyzers only depend on IOrganizationService, so Analyzers/ + Scoring/ + Reporting/ can be lifted into a console app or pac-cli wrapper unchanged.)

Architecture

DeploymentRiskAnalyzerPlugin.cs        MEF entry point (PluginBase)
DeploymentRiskAnalyzerControl.cs       UI + orchestration (BaseToolControl (XrmToolSuite.Core), RunAsync)
Analyzers/
  AnalyzerContext.cs            IAnalyzer contract + shared caches/query helpers
  DependencyAnalyzer.cs
  EnvironmentVariableAnalyzer.cs
  FlowPluginAnalyzer.cs
  SecurityAnalyzer.cs
  SchemaConflictAnalyzer.cs
  DeletedComponentAnalyzer.cs
  FormAnalyzer.cs
  RibbonAnalyzer.cs
  PowerPagesAnalyzer.cs
Scoring/RiskScoreCalculator.cs       Deployment-risk facade over the shared ScoreCalculator (weighted score β†’ Low/Medium/High)
Reporting/DeploymentReportModel.cs   Adapter: AnalysisResult β†’ the shared ReportModel (branding, next steps, verdicts, release-manager AI prompt)
Models/RiskModels.cs                 Finding, severity, result types

Shared source (compiled in from src/Shared/, reused by every score/report tool in the suite):
  Core/Analysis/*      Finding, Severity/ScoreBand, IAnalyzer<T>, ScoreCalculator, ReportModel
  Reporting/*          JSON (+CI block) / Markdown / HTML dashboard / ClosedXML Excel / MigraDoc PDF / OpenXML Word exporters
  Summarization/*      offline templated + AI (Anthropic/OpenAI/Google/Ollama) executive-summary generators

Adding an analyzer = implement IAnalyzer, add one line to _allAnalyzers in the control. Every analyzer is defensive: individual query failures degrade to informational findings rather than aborting the run.

Notes & limitations

  • The AI executive summary is opt-in behind a consent preview; cloud providers (Anthropic/OpenAI/Google) use a session-only API key that is never persisted. Local models (Ollama): run it locally β€” no API key, nothing leaves the machine.
    1. Install: winget install Ollama.Ollama (or ollama.com/download). Ollama serves http://localhost:11434 automatically; start it manually with ollama serve if needed.
    2. Pull a model: ollama pull qwen2.5:7b (also gemma3:4b, llama3.2:3b, qwen2.5-coder:7b). ollama list shows installed models, ollama ps shows loaded ones, ollama run <model> "hi" warms one up.
    3. AI options β–Έ Set API key… β–Έ Provider = Ollama (local), Model = qwen2.5:7b, leave API key blank. The first request loads the model (waits up to 5 min); if Ollama isn't running it falls back to the offline summary. nomic-embed-text is an embedding model β€” use a chat model (qwen2.5/gemma3/llama3.2).
  • PDF export is now native β€” rendered directly with the MigraDoc/PdfSharp GDI build (pure-managed, net48, no SkiaSharp natives), so no browser is required. The signature radial gauge is drawn as a PdfSharp XGraphics overlay (MigraDoc has no charting) and is decorative-only: any drawing failure degrades to a gauge-less PDF rather than failing the export. The HTML dashboard remains available and also prints to PDF from any browser. The MigraDoc/PdfSharp chain ships in the Plugins root alongside the ClosedXML chain (see DEPLOYMENT.md).
  • Duplicate-layer detection samples up to 500 components to keep IN clauses sane on huge solutions.
  • Privilege-name matching for role coverage uses an EndsWith(schemaName) heuristic that covers standard prv{Action}{SchemaName} privileges.
  • Target comparisons match by logical/schema name (metadata IDs differ across environments by design).
  • Requires System Customizer or higher in both environments for full results.
Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2026.7.11 175 7/11/2026
1.2026.7.10 101 7/11/2026
1.2026.7.9 112 7/11/2026
1.2026.7.8 113 7/11/2026
1.2026.7.7 98 7/11/2026
1.2026.7.6 104 7/10/2026
1.2026.7.5 119 7/9/2026
1.2026.7.3 101 7/7/2026
1.2026.7.2 104 7/5/2026

1.2026.7.11: Local models via Ollama (no API key). Shared AI settings dialog; Export moved to the end of the toolbar.