Sidewinder provides a simple framework to deploy runtime application updates via a NuGet package. Bundle your update or new application components into a NuGet package, upload it to a NuGet feed (official, MyGet or your own) and Sidewinder will detect
it, download it and unpack it to a target folder, typically your application install folder.
Sidewinder brings install and update to desktop applications!
Sidewinder uses NuGet packages to add runtime auto-update to your .net 4.0 application. It can pull down a set of NuGet packages, backup your application then extract the package files and then deploy them to your application installation folder. The auto-update
feature of NuGet.exe
was the inspiration for building Sidewinder as I wanted to provide a slick update mechanism for another of my projects,
- 13th Feb 2014 - v1.5.2 released (See
documentation tab for more details). Supports .net 4.5 packages, semantic version numbers and some new fluent update methods to control what happens after update.
Sidewinder targets your application installation
, the runtime install of it - not the development phase - you would still use
as usual during development. However Sidewinder enables all of the
goodness to be leveraged once you have deployed your application - it allows you to easily deploy updates and new components of it. The files from the
package are unpacked and then copied into your application installation folder; when used in conjunction with a scanning IoC container/MEF you can deploy new parts of your application at runtime.
Within a NuGet
package the structure is...
- Content - all files and folders from here are copied to the root of your application. Conflicts where the file already exists and will be overwritten by the update are now manageable with v1.3 of Sidewinder. By default you are prompted to overwrite
(or skip) where a conflict exists. Command line switches are also available to alter this behavior (/overwrite & /manual - see below for more information on them).
- Tools - all files and folders from here are copied to the root of your application. Existing files will be overwritten.
- Lib - as a package can contain multiple builds of the binaries, Sidewinder will attempt to match your application runtime .Net framework version to the best match within the
NuGet package. So if your app is .Net v4.0 and the package only has a lib\net20 folder then it will use these binaries. If there is no suitable framework version folder in the package it just copies everything from the lib folder to your application
It's available via the NuGet
gallery - just search for
. There are two packages available "Sidewinder.Core" and "Sidewinder".
- Sidewinder.Core is a package that contains just core assemblies to do the heavy lifting - this is what you need to add to your application as a NuGet Library Reference.
- Sidewinder is a stand-alone console application that can be used to manually perform an update to a NuGet package. It is also automatically downloaded and used by
Sidewinder.Core to complete an installation.
Full source available from the Source Code tab (Hg repo)
It operates in two steps...step one checks for updates to the nuget packages you have specified and downloads them if available, step two copies the updated files to the installation folder. The smart thing is to make your entire application available as a
NuGet package then Sidewinder can be used to update it from one version to the next. Alternatively if your application utilises a plug-in architecture you can use Sidewinder to pull down plug-in updates or entirely new plug-ins (delivered as NuGet packages).
Step 1) is in process to your application and this checks for updates, performs the backup and launches sidewinder.exe to complete the installation. If there are any updates your application should terminate to allow files to be copied over. This is all the
code that you need to add at the very beginning of your application to check for an update.
if (AppUpdateFactory.Setup(cfg => cfg.Update("SomeNugetPackage")
// quit application as it's about to be updated!
Your application is backed up to a subfolder called "_backup" and you will get a versioned zip file containing your application prior to the update being applied.
The NuGet packages that have updates to them are downloaded to a subfolder called "_updates".
Step 2) is performed by the sidewinder.exe that was launched in step 1....it will wait for the launching process (your app) to stop then copy over the files from the packages downloaded in step 1. That's it...your app has been updated.
This is a stand-alone console application that can be used to manually download NuGet package updates independently of your application. A copy is downloaded as part of your application update and can be found in the <your app folder>\_updates\sidewinder\lib\net40
The command line switches are...
/package [nuget package name] (/p)
/installfolder [app install folder] (/i)
optional switches are...
/feed [nuget feed url]
- /feed allows you to use a different feed than the official NuGet public gallery (eg: myget.org)
- /force will force the download of the latest version of a package (useful if you need to reinstall a package)
- /dependencies will also download any dependent packages referenced by the NuGet package.
- /overwrite will overwrite all existing content files with the version in the update.
- /manual will not overwrite any existing content files - instead the package files are left unpacked in the package download folder (found under "_updates"). You can then manually compare and update files as required. Usually these update files
are removed at the end of an update.
- /skipofficialfeed will skip a check for the package on the official NuGet feed if it cannot be found on a custom feed.
To select the correct runtime version from the NuGet package. If you require the .Net 2.0 binaries from a NuGet package then use the /net20 switch. The default is .net 4.0 (/net40).
This will check for an update to the "wolfpack.healthcheck" NuGet package (on the default official NuGet feed) and any NuGet packages it depends upon and if there is an update available, download and deploy the content to "d:\wolfpack".
sidewinder.exe /p wolfpack.healthcheck /i d:\wolfpack /d
Sidewinder will keep track of all the updates you have downloaded so that it knows what version you have installed and whether an update is available.