MarkChristie.AuditRestore 1.0.3

dotnet add package MarkChristie.AuditRestore --version 1.0.3
                    
NuGet\Install-Package MarkChristie.AuditRestore -Version 1.0.3
                    
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="MarkChristie.AuditRestore" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MarkChristie.AuditRestore" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="MarkChristie.AuditRestore" />
                    
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 MarkChristie.AuditRestore --version 1.0.3
                    
#r "nuget: MarkChristie.AuditRestore, 1.0.3"
                    
#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 MarkChristie.AuditRestore@1.0.3
                    
#: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=MarkChristie.AuditRestore&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=MarkChristie.AuditRestore&version=1.0.3
                    
Install as a Cake Tool

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 injects window.XTB_CONFIG = { baseUrl, token } (org URL + OAuth bearer token from the active connection), then loads app/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.csproj copies ../../audit-restore.html → app/audit-restore.html after 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.cs with proper 32×32 + 80×80 PNG renders of icon.svg, and add logo.png to the repo root for the .nuspec iconUrl.
  • Bump <Version> in both AuditRestore.csproj and AuditRestore.nuspec (must match) per release.
There are no supported framework assets in this 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.0.3 139 9/7/2026
1.0.2 103 9/7/2026
1.0.1 237 6/19/2026
1.0.0 443 6/19/2026

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.