https://github.com/flagbug/clickoncetosquirrelmigrator
A helper library for the migration from ClickOnce to Squirrel.Windows
https://github.com/flagbug/clickoncetosquirrelmigrator
Last synced: about 1 year ago
JSON representation
A helper library for the migration from ClickOnce to Squirrel.Windows
- Host: GitHub
- URL: https://github.com/flagbug/clickoncetosquirrelmigrator
- Owner: flagbug
- License: mit
- Created: 2014-12-09T16:56:39.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-06-17T16:20:50.000Z (almost 11 years ago)
- Last Synced: 2025-02-28T19:05:58.526Z (about 1 year ago)
- Language: C#
- Homepage:
- Size: 2.16 MB
- Stars: 30
- Watchers: 5
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview
This library is a helper for the migration from ClickOnce to [Squirrel.Windows](https://github.com/Squirrel/Squirrel.Windows)
The ClickOnce uninstall code is taken from [Wunder.ClickOnceUninstaller](https://github.com/6wunderkinder/Wunder.ClickOnceUninstaller)
# How to
The migration is super-simple, requiring only one method call in the ClickOnce version of the application and one method call in the Squirrel version of the application.
Create a new ClickOnce version of your application that you ship with the following code:
```cs
using (var updateManager = new UpdateManager("http://update.myapp.com"))
{
var migrator = new InClickOnceAppMigrator(updateManager, "ClickOnceAppName");
await migrator.Execute();
}
```
This installs the Squirrel version of your application and removes the ClickOnce shortcuts.
**Important note:** Make sure you include a copy of Squirrel.exe in your .nupkg file. If you don't do this, you won't have an Update.exe in you app folder, and you're gonna have a bad time.
In the new Squirrel version of your application, call the following code:
```cs
var migrator = new InSquirrelAppMigrator("ClickOnceAppName");
await migrator.Execute();
```
This uninstalls the rest of the ClickOnce application and leaves only the Squirrel version. Done!