MarkChristie.AuditRestore
1.0.3
dotnet add package MarkChristie.AuditRestore --version 1.0.3
NuGet\Install-Package MarkChristie.AuditRestore -Version 1.0.3
<PackageReference Include="MarkChristie.AuditRestore" Version="1.0.3" />
<PackageVersion Include="MarkChristie.AuditRestore" Version="1.0.3" />
<PackageReference Include="MarkChristie.AuditRestore" />
paket add MarkChristie.AuditRestore --version 1.0.3
#r "nuget: MarkChristie.AuditRestore, 1.0.3"
#:package MarkChristie.AuditRestore@1.0.3
#addin nuget:?package=MarkChristie.AuditRestore&version=1.0.3
#tool nuget:?package=MarkChristie.AuditRestore&version=1.0.3
Audit Restore — XrmToolBox plugin
by Mark Christie
The XrmToolBox build of Audit Restore. It's a PluginControlBase that hosts a WebView2
control and loads the same audit-restore.html used by the Power Platform ToolBox tool and the
D365 web resource — so there is one UI and one set of logic across all three hosts.
How it works
AuditRestorePlugin.cs— MEF registration (Name, Description, Author = Mark Christie, icons).AuditRestoreControl.cs— the WebView2 host. On every connection change it injectswindow.XTB_CONFIG = { baseUrl, token }(org URL + OAuth bearer token from the active connection), then loadsapp/audit-restore.html.- The HTML detects
window.XTB_CONFIG, switches to the Fluent 2 light theme (data-host="xtb"), and calls the Dataverse Web API directly with the bearer token. AuditRestore.csprojcopies../../audit-restore.html→app/audit-restore.htmlafter each build, so the plugin always ships the current UI. No style-swap step is needed — the HTML self-themes.
Build & debug
cd xrmtoolbox/AuditRestore
dotnet build -c Debug
To debug, set the project's Start external program to XrmToolBox.exe in your build output and
pass /overridepath:. so it runs from the build folder. Press F5; open Audit Restore from the
tool list, connect to an OAuth/MFA org.
Use an OAuth/MFA connection — the page needs
ServiceClient.CurrentAccessToken. Connections without a bearer token will show the "no token" warning in the XrmToolBox log.
Package for the Tool Library
dotnet build -c Release
nuget pack AuditRestore.nuspec
Then publish the .nupkg to nuget.org and register the package id at
https://www.xrmtoolbox.com/plugins/new/. The .nuspec ships only AuditRestore.dll +
app/audit-restore.html into a Plugins/ folder (XrmToolBox provides WebView2 + the Dataverse SDK).
TODO before publishing
- Replace the placeholder base64 icons in
IconData.cswith proper 32×32 + 80×80 PNG renders oficon.svg, and addlogo.pngto the repo root for the.nuspeciconUrl. - Bump
<Version>in bothAuditRestore.csprojandAuditRestore.nuspec(must match) per release.
Learn more about Target Frameworks and .NET Standard.
-
- XrmToolBox (>= 1.2025.7.71)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
1.0.3: the interface now matches the other tools in the suite - one compact header, the same cards, tables and spacing. It also no longer switches to a dark theme when the tool is opened as a web resource inside Dynamics 365 on a machine set to dark mode; it stays light, like the app around it. This is a visual change only; nothing about how the tool finds or restores records has changed.