ClickOnce: how it works, and the alternatives for .NET apps
ClickOnce is Microsoft's built-in way to install and auto update a .NET desktop app. It still works on modern .NET, with fewer features than it had on .NET Framework. Here's how it works, how to publish, what it can't do, and the four alternatives worth knowing.
ClickOnce is a deployment technology from Microsoft for Windows desktop apps written in .NET. In Microsoft's words, it lets you "create self-updating Windows-based applications that can be installed and run with minimal user interaction". You publish your WPF or Windows Forms app to a web server or file share, users install it from a link, and the app checks that same location for new versions.
It has been part of Visual Studio since 2005, and it's still supported: you can publish .NET Core 3.1, .NET 5 and every later version with it. But the modern .NET version of ClickOnce does less than the .NET Framework one did, and those gaps are usually why people go looking for something else.
Everything below was checked against Microsoft's documentation, and each alternative's own repository, on November 19, 2026.
How ClickOnce works
A ClickOnce deployment is a folder of files described by two XML manifests:
- The deployment manifest, a
.applicationfile. It says which version clients should run and where to check for updates. This is the file users open to install - The application manifest, in a versioned subfolder next to your app's files. It lists every file in that version with a hash
There's also a setup.exe bootstrapper, which installs .NET first if the machine doesn't have it.
When a user opens the .application file, ClickOnce downloads the app into what Microsoft calls "a secure per-user, per-application cache". Nothing goes into Program Files, and no administrator rights are needed unless a prerequisite needs them. A Start menu entry is added.
On each launch, the app reads the deployment manifest from the server. If the version there is newer, it downloads only the files that changed.
ClickOnce on modern .NET
ClickOnce works with .NET Core 3.1 and .NET 5 or later, from Visual Studio 2019 version 16.8 onwards. Three things are different from .NET Framework:
| .NET Framework | .NET Core 3.1, .NET 5 and later | |
|---|---|---|
| Check for updates before the app starts | Yes | Yes, and it's the only option |
| Check in the background after the app starts | Yes | Not supported |
| Update interval setting | Yes | Not supported |
ApplicationDeployment.CheckForUpdate() and Update() from code |
Yes | Not available |
| Reading deployment details | ApplicationDeployment class |
Environment variables, from .NET 7 |
| Command-line manifest tool | Mage.exe |
dotnet-mage |
So on modern .NET you can't show your own "an update is available" window or decide when to update. ClickOnce checks at launch and that's it. Microsoft's documentation is direct about this: environment variables give you the properties, "but .NET 7 does not support the equivalent of ApplicationDeployment methods".
What you can read, from .NET 7 and Visual Studio 2022 version 17.4:
var isClickOnce = Environment.GetEnvironmentVariable("ClickOnce_IsNetworkDeployed");
var version = Environment.GetEnvironmentVariable("ClickOnce_CurrentVersion");
var updateLocation = Environment.GetEnvironmentVariable("ClickOnce_UpdateLocation");
The full list also includes ClickOnce_ActivationUri, ClickOnce_DataDirectory, ClickOnce_IsFirstRun, ClickOnce_TimeOfLastUpdateCheck, ClickOnce_UpdatedVersion and ClickOnce_UpdatedApplicationFullName.
How to publish with ClickOnce
In Visual Studio:
- Right-click the project and choose Publish
- Choose Folder as the target, then ClickOnce
- Set the publish location, which is where the files are written
- Set the install location, which is the URL or share users will install from. Updates are checked there too unless you set a separate update location
- In Settings, choose the update options, prerequisites and publish version
- Choose a certificate to sign the manifests
- Finish, then Publish
That saves a publish profile, a .pubxml file, which you need for command-line builds. From a Visual Studio Developer Command Prompt:
msbuild /t:publish /p:PublishProfile=ClickOnceProfile.pubxml /p:PublishDir="bin\publish"
Two things to know about command-line builds. The revision number isn't incremented automatically as it is in Visual Studio, so set the version yourself. And use msbuild: in the .NET repositories, Microsoft's maintainers have said dotnet publish doesn't support ClickOnce and closed the requests as not planned.
Then upload the publish folder. ClickOnce installs from any HTTP 1.1 web server or file share, so static hosting works. If your server doesn't know the file types, add them:
| Extension | MIME type |
|---|---|
.application |
application/x-ms-application |
.manifest |
application/x-ms-manifest |
.deploy |
application/octet-stream |
Microsoft Edge opens .application links directly by default, from version 87.
Forcing an update
By default, a user who's offered an update can skip it and keep running the old version. To make one mandatory, set a minimum required version in the publish settings. It ends up in the deployment manifest like this:
<deployment install="true" minimumRequiredVersion="1.4.0.0">
A user on anything older must accept the update or close the app.
Signing a ClickOnce app
The manifests are signed with an Authenticode certificate, the same kind you'd use with SignTool. Microsoft's documentation says signing is technically optional for .exe-based apps and that unsigned manifests "introduce substantial security risks in a production environment".
In practice, signing decides what your users see. With a self-signed certificate, Microsoft says ClickOnce identifies the app "as coming from an Unknown Publisher", and the install dialog asks the user to approve it. A certificate from a trusted authority shows your name there.
You don't need to buy a certificate on a USB token for this. Microsoft's GitHub Action for Azure Trusted Signing has a ClickOnce mode: you point it at the .application file and setup.exe, and it finds and signs the rest in the right order.
What ClickOnce can't do
Microsoft's own comparison with Windows Installer lists what ClickOnce leaves out:
- Install for all users of a machine. Every install is per user
- Install drivers or shared files, or anything in the Global Assembly Cache
- Add the app to the Startup group
- Write freely to the registry at install time. Access is limited
- Choose the install folder. Apps live in the ClickOnce cache
It can register file types, and it can roll back to the previous version, which Windows Installer can't.
Three more limits from current documentation:
- No password-protected update server. ClickOnce supports Windows Integrated authentication only. Microsoft says it "doesn't provide support for other authentication protocols such as Basic or Digest", and there's no documented way to add a custom header
- No WinUI 3. Microsoft's packaging guide says ClickOnce isn't supported for WinUI 3 apps
- Windows only
The first one matters if you sell your app. There's no built-in way to make updates depend on who's asking, so a ClickOnce update server gives every version to anyone who has the URL.
When ClickOnce is still the right choice
- Internal line-of-business apps, where users are on your network and nobody needs to be sold anything
- Apps installed from a file share by people without admin rights
- Teams that already have a ClickOnce deployment that works, and are on .NET Framework or content with update-at-launch
If you're shipping a commercial app to the public and starting today, one of the alternatives below will usually serve you better.
The alternatives
| Installs the app | Updates | Feed | Best for | |
|---|---|---|---|---|
| ClickOnce | Yes, per user | At launch, changed files only | .application manifest |
Internal apps |
| MSIX with App Installer | Yes | At launch or in the background | .appinstaller file |
Apps that also go to the Microsoft Store |
| Velopack | Yes, per user or per machine | In the background, with deltas | releases.win.json |
New commercial apps |
| NetSparkle | No, it runs your installer | Update window, on a timer | Sparkle appcast (XML or JSON) | Apps with an existing installer |
| AutoUpdater.NET | No, it runs your installer or unpacks a zip | Update window | A small XML file | The simplest possible setup |
MSIX with App Installer
MSIX is Microsoft's modern package format. Outside the Store, you publish the package with an .appinstaller file, an XML file that says where the package is and how to update it. Updates can be checked on launch, with HoursBetweenUpdateChecks defaulting to 24, or by a background task that runs every 8 hours.
Two things to know. MSIX packages must be signed with a certificate the user's machine trusts. And the ms-appinstaller: link protocol, which used to install an app straight from a web page, has been disabled by default since December 2023; Microsoft now says to link to the .appinstaller file so users download and open it. The MSIX guide covers packaging, signing and the .appinstaller file in full.
Velopack
Velopack is an open source (MIT) installer and updater, and the successor to Squirrel.Windows. It's the closest thing to "ClickOnce, but you control it". The latest stable release is 1.2.161, from September 2026.
static void Main(string[] args)
{
VelopackApp.Build().Run();
// your other startup code
}
private static async Task UpdateMyApp()
{
var mgr = new UpdateManager("https://updates.myapp.com/releases");
var newVersion = await mgr.CheckForUpdatesAsync();
if (newVersion == null)
return; // no update available
await mgr.DownloadUpdatesAsync(newVersion);
mgr.ApplyUpdatesAndRestart(newVersion);
}
Build a release with its command-line tool:
dotnet publish yourApp.csproj -c Release --self-contained -r win-x64 -o .\publish
dotnet tool install -g vpk
vpk pack --packId YourAppId --packVersion 1.0.0 --packDir .\publish --mainExe yourMainApp.exe
You get a Setup.exe, delta packages and a feed file to upload to any static host. Unlike ClickOnce on modern .NET, you decide when to check and when to apply. The Velopack guide has the full setup, and Velopack also works for Python apps.
NetSparkle
NetSparkleUpdater is an open source (MIT) update framework written in C#, modelled on Sparkle for macOS. It doesn't install your app. It reads an appcast, shows an update window with release notes, downloads your installer (.exe, .msi or .msp), checks its Ed25519 signature, and runs it. There are UI packages for WPF, Windows Forms and Avalonia. The latest stable release is 3.1.0, from May 2026, and its NuGet package targets .NET Framework 4.6.2 through .NET 10.
_sparkle = new SparkleUpdater(
"https://updates.myapp.com/appcast.xml",
new Ed25519Checker(SecurityMode.Strict, "base_64_public_key_from_generate_app_cast_tool")
) {
UIFactory = new NetSparkleUpdater.UI.WPF.UIFactory(icon),
RelaunchAfterUpdate = false,
};
_sparkle.StartLoop(true);
Its command-line tool generates the keys and the appcast:
dotnet tool install --global NetSparkleUpdater.Tools.AppCastGenerator
netsparkle-generate-appcast --generate-keys
netsparkle-generate-appcast -b binary/folder -p change/log/folder -u https://example.com/downloads
One detail: NetSparkle's appcast is Sparkle-compatible "for the most part". It reads the signature from a sparkle:signature attribute where Sparkle and WinSparkle use sparkle:edSignature.
AutoUpdater.NET
AutoUpdater.NET is an open source (MIT) class library and the smallest of the four. The latest release is 1.9.3, from July 2026. One line starts it:
AutoUpdater.Start("https://updates.myapp.com/update.xml");
And the file it reads is this:
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>2.0.0.0</version>
<url>https://updates.myapp.com/MyApp-2.0.0.zip</url>
<changelog>https://myapp.com/release-notes</changelog>
<mandatory>false</mandatory>
</item>
It shows a dialog, downloads the file, and either runs the installer or unpacks the zip over the app. It supports HTTP basic authentication for the XML file and the download. Its integrity check is an optional checksum in the XML file, and its README doesn't document a signature scheme, so the update is as trustworthy as your server and your installer's Authenticode signature.
Updates only for licensed customers
If you sell your app, you may want updates to follow the license: a lapsed subscription or a refunded order stops receiving new versions, and version 2 customers aren't handed version 3 for free. ClickOnce can't do that, because its update server can't ask who's calling. The alternatives can, because your code makes the request.
LicenseSeat provides the server side. You upload each release, and it hosts the files and serves update feeds per product:
- A Sparkle appcast, at
https://licenseseat.com/p/<product-slug>/appcast.xml. Windows installers are listed with Ed25519 signatures under bothsparkle:edSignatureand thesparkle:signatureattribute NetSparkle reads - A plain JSON endpoint with the latest version, download URL and SHA-512, for Velopack custom sources, AutoUpdater.NET or your own check:
curl https://licenseseat.com/p/<product-slug>/latest
With the feed set to licensed, both accept the customer's license key as a bearer Authorization header or a license_key query parameter. A request without a valid key gets an empty feed, and the version the customer already has keeps working. Inside the app, the C# SDK handles activation, device limits and offline validation with the same key.
The guide to shipping desktop updates covers the feeds in detail. LicenseSeat charges a flat monthly fee and takes 0% of your revenue.
Common questions about ClickOnce
Is ClickOnce deprecated?
No. Microsoft's documentation covers publishing .NET Core 3.1, .NET 5 and later apps with ClickOnce, and its pages were updated in 2026. Some features from .NET Framework, such as background updates and the update API, weren't carried over.
Does ClickOnce work with .NET 8 and later?
Yes. ClickOnce publishing is supported for .NET Core 3.1, .NET 5 and newer Windows desktop apps, from Visual Studio 2019 version 16.8. The app checks for updates before it starts, which is the only update mode on modern .NET.
Can I check for ClickOnce updates from code?
On .NET Framework, yes, with ApplicationDeployment.CheckForUpdate(). On modern .NET, no. From .NET 7 you can read deployment properties from environment variables, but there's no equivalent of the update methods.
Does ClickOnce need administrator rights?
No. It installs into a per-user cache without touching Program Files. The exception is a prerequisite, such as a runtime, that itself needs admin rights to install.
Can I publish ClickOnce with dotnet publish?
Use msbuild /t:publish with a publish profile. Microsoft's maintainers have said in the .NET repositories that dotnet publish doesn't support ClickOnce.
Can ClickOnce install for all users?
No. Each user installs their own copy. If you need a per-machine install, use an MSI, MSIX, or Velopack's MSI option.
What is the best alternative to ClickOnce?
For a new commercial app, Velopack is the closest replacement: it installs per user without admin rights and gives you control over updates. If you already have an installer, NetSparkle or AutoUpdater.NET add update checks to it. For Store distribution, use MSIX.
Can I restrict ClickOnce updates to paying customers?
Not with ClickOnce alone. It supports only Windows Integrated authentication and can't send a license key with the update check. You'd need an updater whose requests your code controls, and a feed that checks licenses.