ClickOnceUninstaller 1.0.0

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

An uninstaller for ClickOnce applications

NuGet

A .NET library to programmatically uninstall ClickOnce-deployed applications — silently, without the interactive "Maintenance" dialog.

Why?

Apparently, ClickOnce installations can't be removed silently. The ClickOnce uninstaller always shows a "Maintenance" dialog, requiring user interaction.

For Wunderlist 2.1 the original authors wanted to switch from a ClickOnce deployment to a Windows Installer package using the WiX Toolset. They wanted this switch to be integrated into the new installer, invisible to the user.

What?

ClickOnceUninstaller imitates the actions performed by the ClickOnce uninstaller, removing files, registry entries, start menu and desktop links for a given application.

It automatically resolves dependencies between installed components and removes all of the application's components which are not required by other installed ClickOnce applications.

Requirements

  • Windows only. The library reads and writes ClickOnce registry keys under HKEY_CURRENT_USER and uses Windows-specific ClickOnce/System.Security.Policy APIs.
  • Targets .NET Framework 4.8 (it cannot target .NET Core / .NET 5+ because of the ClickOnce APIs it depends on).

Install

dotnet add package ClickOnceUninstaller

or, from the Package Manager Console:

Install-Package ClickOnceUninstaller

How?

using ClickOnceUninstaller;

// Look the application up by its display name (as shown in "Apps & features")
var uninstallInfo = UninstallInfo.FindByName("Application Name");
if (uninstallInfo != null)
{
    var uninstaller = new Uninstaller();
    uninstaller.Uninstall(uninstallInfo);
}

Other ways to locate an installed application:

// By the update URL of the ClickOnce deployment
var byUrl = UninstallInfo.FindByUpdateUrl("https://example.com/app/App.application");

// Enumerate every installed ClickOnce application
foreach (var info in UninstallInfo.FindAll())
{
    Console.WriteLine($"{info.Name} {info.Version} — {info.Publisher}");
}

License

The source code is available under the MIT license.

Originally developed by 6 Wunderkinder for Wunderlist.

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.
  • .NETFramework 4.8

    • No dependencies.

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.0 119 7/2/2026