- Fixed an issue in
GithubPackageResolver
which prevented it from working properly with private repositories. (Thanks @derech1e)
- Fixed an issue in
GithubPackageResolver
where the version was not extracted correctly if release name was not set, but tag name was. (Thanks @miakh) - Changed logging in
Onova.Updater
so that each new entry is flushed to file as soon as possible. This should help avoid empty logs after crashes.
- Added an overload for
LaunchUpdater
that allows specifying custom command line arguments to use when restarting the application. - Fixed an issue where the application was incorrectly restarted with a hidden window in case of a console application.
- Replaced Newtonsoft.Json dependency with System.Text.Json. This means that Onova doesn't have any external dependencies now, when used in a project targeting .NET Core 3.0 or higher.
- Extended support for cancellation to
CheckForUpdatesAsync
and some other methods. - Supported .NET Framework version was bumped from v4.6 to v4.6.1.
Note, there were some very minor changes in interfaces IUpdateManager
and IPackageResolver
. If you were implementing them yourself, you will have to update to the new contract, but the changes should be trivial.
- Added an overload for
AssemblyMetadata.FromAssembly
that also takes an assembly file path. This can be used to override default assembly file path in cases where the entry assembly is launched via a proxy. - Added
IUpdateManager.Updatee
property to expose the updatee metadata for convenience. For example, it can be used to show current application version in the UI. - Added nullable reference type annotations.
- Added source link.
- Fixed
GetPreparedUpdates
throwing an exception when storage directory hasn't been created yet.
- Added
GetPreparedUpdates
method that returns a list of versions for which an update has been prepared. Useful in certain auto-update scenarios, for example when the preparation happens during application lifetime, but the update is applied at startup. - When restarting updatee, command line arguments are now routed from the application that initiated the update.
- Fixed an issue where updatee wasn't restarted properly if it's a
.dll
file.
- Added support for restarting .NET Core 3.0 apps. If the updatee is not an
.exe
file, it will try to find an.exe
file with the same name. If it's not found, it will try to restart updatee viadotnet
.
- Renamed methods on
IPackageExtractor
andIPackageResolver
. - Fixed incorrect behavior in
ZipPackageExtractor
andNugetPackageExtractor
when used with archives that contain subdirectories. - Fixed an issue in
Onova.Updater
where files in subdirectories were copied to incorrect locations. - Fixed an issue where
ZipPackageExtractor
threw an exception when the destination path is rooted. - Improved exception messages.
- Fixed an issue where launched instances of
Onova.Updater
weren't detected if they were started by a different process. - Fixed an issue where
Onova.Updater
didn't properly wait until all updatee instances exit if one of those instances launched after the updater did. - Log file now keeps track of only one session.
- Lock file is now acquired on first call to
PrepareUpdateAsync
orLaunchUpdater
. - Removed
UpdateManager.Cleanup
due to conflicts with lock file.
- Added .NET Standard 2.0 target with Windows-only support for Windows applications running on .NET Core.
- Added a lock file to ensure that only one instance of the application is able to download and install updates.
Onova.Updater
will now wait until all instances of the application exit, instead of just the one that launched it.
- Added caching support to
GithubPackageResolver
usingIf-None-Match
header. - Fixed an issue where an internal stream didn't implement
ReadAsync
correctly.
- Added support for relative package URLs in manifest for
WebPackageResolver
. - Added configurable API base address in
GithubPackageResolver
which can be useful for on-premise hosted instances. - Fixed exception messages not appearing in Visual Studio.
- Improved logging in
Onova.Updater
. - Fixed some issues with progress not being reported properly or at all.
- Removed
IHttpService
,HttpService
in favor of using unwrappedHttpClient
. - Added default file name pattern to
LocalPackageResolver
which matches all files. LocalPackageResolver
no longer throws an exception if the repository directory doesn't exist.LaunchUpdater
is now a synchronous method.- Added
IsUpdatePrepared
method that can be used to check if an upate to certain version has already been prepared.
- Added
NugetPackageResolver
which resolves packages from a NuGet feed. - Added
NugetPackageExtractor
which extracts NuGet packages. - Added
WebPackageResolver
which resolves packages using a manifest provided over HTTP. - Added
AggregatePackageResolver
which can be used to combine multiple otherIPackageResolver
instances. - Asset names are now matched using a wildcard pattern in
GithubPackageResolver
, instead of a strictly predefined name. LocalPackageResolver
now uses its own wildcard pattern matching for files, to avoid some inconsistent behavior provided by native Windows methods.- Renamed most public API members to improve naming.
- Added
IUpdateManager
to aid in testing. - Updates can no longer be applied more than once during a single runtime. Trying to launch the updater a second time will throw an exception.
- Implemented progress reporting for downloading and extracting packages.
CheckForUpdatesResult
now also contains the list of all available package versions, returned by the resolver.CheckForUpdatesResult.LastVersion
is nownull
if the resolver does not provide packages of any version.Onova.Updater
will now prompt for elevated privileges if it doesn't have write permissions to updatee's directory.Onova.Updater
executable is now renamed according to updatee's name to be more recognizable when prompting user for elevated privileges, e.g.MyProject.Updater.exe
.- Fixed
Onova.Updater
not copying files that don't have extensions. - Added logging to
Onova.Updater
. Log file is saved next to the executable. HttpService.GetStreamAsync
extension method will now try to resolve content length from response headers.