Skip to footer content
Iron Academy Logo
C# Application
C# Application

Other Categories

Deploy and Update C# Desktop Apps Fast with Velopack

Tim Corey
32m 25s

Deploying and updating cross platform desktop applications has traditionally been one of the most frustrating parts of development. But as Tim Corey explains in his video “Deploy and Update C# Desktop Apps Fast with Velopack”, this process can now be extremely easy.

With Velopack, a fantastic tool designed to handle everything from building packages to applying updates, developers can now create, deploy, and maintain their applications using just one command — without complex build pipelines or endless configuration files.

In this article, we’ll take a detailed walkthrough of Tim’s entire 32-minute tutorial, covering how to use Velopack to turn a standard C# WPF app into a self-updating portable package. We’ll also see how it supports automatic migrations, code signing, and zero config setup for multiple platforms — all while maintaining native performance.

Introduction: Why Velopack?

Tim opens by explaining that deploying and updating desktop applications doesn’t have to be hard — in fact, it can be “downright easy.” His goal in this video is to show how Velopack can simplify the process by packaging a WPF application, creating an installer, and enabling automatic updates with minimal configuration.

He stresses that this isn’t limited to WPF — the same process works for WinForms, console apps, or even non-.NET software like Java, Rust, or C++. Velopack supports building packages for nearly any language or framework, making it one of the best installer frameworks available today for cross platform applications.

Creating the WPF Project

Tim starts inside Visual Studio 2022, creating a simple WPF project named DeployDemo. The project targets .NET 9, but as he points out, it works perfectly on newer versions such as .NET 10.

This initial build is just a small application to demonstrate the full deployment and update process. Though he uses WPF, he repeats that Velopack works equally well for cross platform desktop applications, making it a one solution approach for all types of .NET and even non-.NET projects.

Installing Velopack as a Global Tool

Next, Tim opens the terminal and types:

dotnet tool install -g vpk

This single command installs Velopack globally on the system, enabling developers to run Velopack commands from anywhere.

Tim calls this the “secret sauce step” because Velopack takes the compiler output from your project and transforms it into a self updating portable package. This step gives your app a professional installer and auto update framework — all in one.

He explains that the command line not only simplifies setup but also integrates easily into CI/CD pipelines, so developers can automate packaging, creating releases, and deployment without additional scripts. The ability to automate with just one command means developers can save valuable time while maintaining consistent builds.

Installing the Velopack NuGet Package

Inside Visual Studio, Tim opens Manage NuGet Packages and installs the Velopack package.

He explains that Velopack is the successor to Squirrel, a previously popular installer framework. If you’ve used Squirrel, Velopack can automatically migrate your existing setup — offering improved reliability, significantly faster builds, and better cross platform compatibility.

Velopack can produce desktop installers for Windows, Linux, and macOS, supporting various programming languages such as C#, Rust, C++, and JavaScript. It’s a framework for cross platform app deployment that works fabulously across systems.

Tim emphasizes that Velopack is completely free to use — there’s no subscription or license fee, yet it delivers professional installer frameworks comparable to commercial solutions.

Initializing Velopack in Code

In the App.xaml.cs file, Tim adds a constructor and initializes Velopack with just a few lines of code:

new VelopackApp()
    .Build()
    .Run();
new VelopackApp()
    .Build()
    .Run();

This zero config setup immediately connects the app to Velopack’s automatic update framework. While this doesn’t check for updates yet, it’s what enables Velopack’s performance during later steps when it starts managing updates and installations.

Tim explains that even though this setup is simple, it’s powerful enough to make the app self-updating, ensuring users always run the latest version on their end user’s machine.

Designing the User Interface

Before diving deeper into updates, Tim builds a basic WPF interface. He creates a grid layout and places an Update button at the top right.

Initially, a misplaced element causes an error, but Tim uses it to remind viewers how important layout hierarchy is in WPF. Once corrected, the installable application’s interface looks clean and resizable — showing how Velopack works great with popular frameworks like WPF.

He then adds a StackPanel containing a text box (mainTextBox) and a Submit button (submitButton). When the app runs, it displays a minimal, working UI. This small project will later be used to demonstrate updates being applied automatically.

Implementing the Update Button

Now Tim moves to functionality. He double-clicks the Update button to generate its click event. This will become the heart of the auto update framework.

He explains that you could break the process into three phases — checking, downloading, and applying updates — but for this demo, he combines all three into one event to make it straightforward.

Writing the Update Logic

In MainWindow.xaml.cs, Tim creates a new UpdateManager and points it to a local path that will act as the update source:

var mgr = new UpdateManager(@"C:\temp\DeployDemoServer");
var mgr = new UpdateManager(@"C:\temp\DeployDemoServer");

In real-world use, this path might be an HTTPS URL for an external facing application, or a local file share for internal distribution. Velopack doesn’t require heavy config — it works seamlessly in either environment.

Then, Tim adds async code to handle version checking and updates:

var newVersion = await mgr.CheckForUpdatesAsync();

if (newVersion == null)
{
    MessageBox.Show("You are on the latest version.");
    return;
}

await mgr.DownloadUpdatesAsync(newVersion);
await mgr.ApplyUpdatesAndRestartAsync(newVersion);
var newVersion = await mgr.CheckForUpdatesAsync();

if (newVersion == null)
{
    MessageBox.Show("You are on the latest version.");
    return;
}

await mgr.DownloadUpdatesAsync(newVersion);
await mgr.ApplyUpdatesAndRestartAsync(newVersion);

This code checks for a newer version, downloads delta packages, and applies them instantly. Velopack takes care of everything — the app restarts automatically once the update is complete.

He explains that while this demo uses a button click, developers can also trigger these updates silently or automatically at startup, just like professional software.

Publishing the Application

Next, Tim demonstrates how to publish the first version. Using the terminal inside the project folder, he runs:

dotnet publish --self-contained -r win-x64 -o ./publish

This generates a self-contained build that includes the .NET runtime. That means the application will run on any end user’s machine without requiring .NET to be installed separately.

Tim shows the compiled output — the DeployDemo.exe file — in the publish directory, confirming it runs correctly. At this point, it’s just the compiler output — not yet a packaged, installable version.

Creating the Installer Package

To turn the published files into a deployable installer, Tim uses Velopack’s pack command:

vpk pack --pack-id DeployDemo --pack-version 1.0.0 --pack-directory ./publish

This creates a Releases folder containing all the necessary files, including setup executables.

Tim copies the release files to a local “server” folder. Running the generated setup file installs the app completely — it creates shortcuts, adds an entry in the Programs and Features list, and provides a native installation experience without extra permissions or UAC prompts.

Now, the app is an official installable application powered by Velopack.

Updating the Application

To simulate an update, Tim modifies the Submit button’s code:

MessageBox.Show($"Hello {mainTextBox.Text}");
MessageBox.Show($"Hello {mainTextBox.Text}");

He then repackages the app by repeating the same publish and pack commands but with an updated version number:

vpk pack --pack-id DeployDemo --pack-version 1.0.1 --pack-directory ./publish

Velopack automatically creates delta packages (tiny differential files for existing users) and a full package for new installations. Tim notes that while the full package is around 63 MB, the delta package is only 132 KB — proof that Velopack is significantly faster and more efficient than other tools or installer frameworks.

He copies the new releases to the server folder, effectively creating releases for version 1.0.1.

Applying the Update

Tim reopens the installed application and clicks the Update button. In seconds, Velopack downloads and applies the 1.0.1 update — restarting the app automatically.

When he types his name and hits Submit, it now says “Hello Tim.” The update framework worked lightning fast, confirming that Velopack integrates easily and handles the entire update cycle flawlessly.

He points out that developers could host these releases on Azure, file storage, or a web repository, and the same automatic update logic would still work across Windows, Linux, or macOS.

Simplified Maintenance and Flexibility

Tim highlights how this process makes desktop app maintenance extremely easy. Developers can deploy internal tools or public software with full auto-update functionality using minimal config and no external dependencies.

Velopack offers a familiar API for .NET developers and handles every step:

  • Publishing builds

  • Building packages

  • Creating releases

  • Applying updates

  • Uninstalling cleanly

All this happens without requiring a complex build pipeline or deep configuration files.

Tim calls Velopack a fantastic tool that helps developers save valuable time while delivering polished, professional software. It’s a framework for cross platform updates that “just works.”

Uninstalling and Version Tracking

Tim demonstrates that the installed app appears in Windows’ “Uninstall or Change a Program” list, showing version 1.0.1. Removing it is seamless — Velopack simply deletes the folder, leaving no residue.

He adds that Velopack works fabulously not just for WPF but also for WinForms, UNO Platform, and even older .NET Framework 4.6.2 projects. It’s also compatible with other popular frameworks and languages like Rust or JavaScript, making it a universal solution for cross platform installers.

Conclusion

Wrapping up, Tim expresses how extremely impressed he is with Velopack’s performance. With only a few steps — installing the tool, adding one line of code, and running two commands — developers can go from a plain .NET project to a fully installable, self-updating, cross platform application.

He offers a huge thank you to the Velopack developers for building such a great work of engineering, calling it possibly the best installer and update framework for cross platform desktop applications available today.

Tim finishes by reminding viewers that all the details, commands, and source code are available in the video description. He encourages developers to discuss ideas, request features, and contribute to the project’s future through its public repository.

Hero Worlddot related to Deploy and Update C# Desktop Apps Fast with Velopack
Hero Affiliate related to Deploy and Update C# Desktop Apps Fast with Velopack

Earn More by Sharing What You Love

Do you create content for developers working with .NET, C#, Java, Python, or Node.js? Turn your expertise into extra income!