Description
Installation works. App is squirrel-aware as per log. First Run, Initial Install, Uninstall works.
AppUpdate will NOT call.
Steps to recreate
Install app.
Update app.
Code does not run. (Procedure not called.) Note; SquirrelTemp log is only accessed on the initial install and nothing logs for updates.
Expected behavior
Should hit my custom events. (This is an issue because all my shortcuts are still pointing to the previous version.)
Actual behavior
Nothing.
Additional information
Perhaps this is because I am misunderstanding WHEN this will be called? My assumption was that the AppUpdate event would be called on the launch after an update is installed (i.e. the first time the new version launches.) however, the first item in each of my Squirrel custom events is an event log entry and everything else is being called beautifully! Only the AppUpdate is never called.
As a current workaround, I am writing the version to the registry and then testing the registry value vs. the actual version value and if it's different, I am running my code, but I'd rather use the innate Squirrel functions.
Event Wireup Code:
Private Sub MyApplication_Startup(sender As Object, e As StartupEventArgs) Handles Me.Startup
Application.Log.WriteEntry("Datacomp8 Starting Up. 1029.")
Try
Dim ver As System.Version = New System.Version
Dim install As Action(Of Version) = AddressOf mSquirrel.squirrelInitialInstall
Dim update As Action(Of Version) = AddressOf mSquirrel.squirrelAppUpdate
Dim uninstall As Action(Of Version) = AddressOf mSquirrel.squirrelAppUninstall
Dim firstRun As Action = AddressOf mSquirrel.squirrelFirstRun
SquirrelAwareApp.HandleEvents(onInitialInstall:=install, onAppUpdate:=update, onAppUninstall:=uninstall, onFirstRun:=firstRun)
Catch ex As Exception
My.Application.Log.WriteException(ex)
End Try
Application.EnableVisualStyles() = True
End Sub
Update Procedure:
Public Sub squirrelAppUpdate(v As Version)
My.Application.Log.WriteEntry("Squirrel App Updated: Datacomp8 App Updated To Current Version", TraceEventType.Information)
Try
Using mgr As New UpdateManager(updateURL)
mgr.CreateShortcutForThisExe()
mgr.CreateShortcutsForExecutable("Datacomp8.exe", ShortcutLocation.Desktop, True)
mgr.CreateShortcutsForExecutable("Datacomp8.exe", ShortcutLocation.StartMenu, True)
Dim sqPath As String = Path.Combine(mgr.RootAppDirectory.ToString())
Dim appPath As String = Path.Combine(sqPath, "app-" & Version)
Dim vstoPath As String = Path.Combine(sqPath, "VSTO")
Dim roPath As String = Path.Combine(sqPath, "app-" & Version, "RUNONCE")
UpdateConfigFiles(appPath)
RunOnceFolders(roPath, False)
UpdateVSTOFiles(vstoPath)
End Using
Catch ex As Exception
My.Application.Log.WriteException(ex)
End Try
End Sub
Squirrel version(s) 1.9
Description Installation works. App is squirrel-aware as per log. First Run, Initial Install, Uninstall works. AppUpdate will NOT call.
Steps to recreate Install app. Update app. Code does not run. (Procedure not called.) Note; SquirrelTemp log is only accessed on the initial install and nothing logs for updates.
Expected behavior Should hit my custom events. (This is an issue because all my shortcuts are still pointing to the previous version.)
Actual behavior Nothing.
Additional information Perhaps this is because I am misunderstanding WHEN this will be called? My assumption was that the AppUpdate event would be called on the launch after an update is installed (i.e. the first time the new version launches.) however, the first item in each of my Squirrel custom events is an event log entry and everything else is being called beautifully! Only the AppUpdate is never called.
As a current workaround, I am writing the version to the registry and then testing the registry value vs. the actual version value and if it's different, I am running my code, but I'd rather use the innate Squirrel functions.
Event Wireup Code:
Update Procedure: