Because AppStart is responsible for launching the latest version of your application, and polling the deployment server for updates, it requires a hefty set of configuration data before it will work. This is possibly the trickiest part of the process, as there are numerous settings and each must be configured exactly right. On top of this, there are a few "gotchas" and problems you will need to work through.
The Updater block documentation lists several ways to configure AppStart, but by far the easiest and most flexible approach is to put the configuration for both AppStart and the Application Updater assembly into a single app.config
file in the AppStart project. You need to add the app.config
file yourself (Add | New Item | Application Configuration File).
The documentation for the block lists the required settings in some detail, so I won't reproduce them here, but you should note the following caveats:
The AppStart app.config
holds the configuration settings for both the AppStart and AppUpdater assemblies, so create sections for both assemblies in the <configSections>
tag, as follows:
ConfigSectionHandler ,AppStart" />
In the <appStart>
section you set configuration data about your installed application, including the name of your application's .exe
file, the initial version (which you should explicitly set in the AssemblyInfo.cs
file), and the last updated timestamp (just use the default setting defined in the documentation).
You will also need to specify the folder where AppStart can locate your application exe file; unfortunately, this <appFolderName>
setting requires an absolute path to your application's executable file. This is a design flaw with the current version of the blockyou can only specify an absolute path if you know with absolute certainty where your application will be installed. Unfortunately, users can elect to install your application to any location they like on their machine. This may not be a problem for you (for instance, if you work within an organization and can dictate installation locations), but if it is you'll find one possible solution later in this article. For now, define the <appFolderName>
as a location relative to the AppStart.exe
locationthe folder that you earlier named "126.96.36.199", the initial version of your application.
You also need to set the <installedVersion>
tag to this value, to indicate to the Updater which version of your application the user initially has installed. At runtime the Updater compares this version with the version specified in the server manifest, and only downloads updates with a higher version number. The Updater creates a new folder for the downloaded application files, named after the folder that contained the update on the server (this is where a good update folder naming convention comes in handyname the folders after the version numbers they represent). After the download is complete, the Updater changes the value of the <appFolderName>
element to the newly created folder, and changes <installedVersion>
to reflect the new version number. This ensures that AppStart will launch the newly installed version the next time the user launches your application.
config section should resemble the example below: