Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:06

    dependabot[bot] on github_actions

    (compare)

  • 11:06
    dependabot[bot] closed #502
  • 11:06
    dependabot[bot] edited #502
  • 11:06
    dependabot[bot] commented #502
  • 11:05
    dependabot[bot] edited #502
  • 11:05

    GeertvanHorrik on develop

    GitHubSync update Merge pull request #503 from Wi… (compare)

  • 11:05

    GeertvanHorrik on 20230130-110448

    (compare)

  • 11:05
    GeertvanHorrik closed #503
  • 11:05
    GeertvanHorrik opened #503
  • 11:05

    GeertvanHorrik on 20230130-110448

    GitHubSync update (compare)

  • 01:00
    dependabot[bot] labeled #502
  • 01:00
    dependabot[bot] labeled #502
  • 01:00
    dependabot[bot] opened #502
  • 01:00

    dependabot[bot] on github_actions

    Bump dependabot/fetch-metadata … (compare)

  • 00:44

    github-actions[bot] on nuget

    (compare)

  • 00:44

    github-actions[bot] on develop

    Bump Verify.NUnit from 19.7.1 t… Merge pull request #501 from Wi… (compare)

  • 00:44
    github-actions[bot] closed #501
  • 00:44
    dependabot[bot] labeled #501
  • 00:44
    dependabot[bot] labeled #501
  • 00:44
    dependabot[bot] opened #501
samirem
@samirem

I updated the following:

Catel.Fody from 2.14 to 2.16.2,
Fody from 1.29.4 to 2.0.2,
LoadAssembliesOnStartup.Fody from 1.7.0 to 1.8.1,
MethodTimer.Fody from 1.16.0 to 1.19.0,
ModuleInit.Fody from 1.5.9.0 to 1.6.0,
Mono.Cecil from 0.9.6.1 to 0.10.0-beta6

I do believe that my automatic updates stopped working before this though, but I am not 100% sure.

I do remember that my automatic updates broke from version 0.0.9 to 0.0.10, and at first I believed that it was a bug with squirrel.windows (not accepting number higher than 9). But I found that it stopped working when I tried updating from 0.1.0 to 0.1.1 as well.

Geert van Horrik
@GeertvanHorrik
we recommend using GitVersion for versioning, but that's another story
you are sure the end-user didn't disable the automatic updates?
samirem
@samirem
I'll look into GitVersion, thx!
Yes I'm sure, at this point the app is still in testing stage, so I'm the end-user at the moment
samirem
@samirem
Actually, now I found this in my logs:
[WARNING] [Catel.Data.ModelBase] [1] Property 'AutomaticUpdates.CheckForUpdates' is registered after construction of type 'Catel.Configuration.DynamicConfiguration', but could not be found using reflection
Geert van Horrik
@GeertvanHorrik
that's ok, it's a dynamic configuration (hence dynamic properties, and thus not found v ia reflection)
samirem
@samirem
@GeertvanHorrik I want to restart my application after it has been updated by Orc.Squirrel (and preferably keep any command-line args), do you have any sample code of this? Since catel/orchestra is so extensive, I'm assuming that there already exists some neat service for this, which I haven't found :)
Geert van Horrik
@GeertvanHorrik
Unfortunately we don't have such behavior. We show a squirrel icon in the app and let the user restart the app in a convenient time. They can double click the squirrel and we'll ask them whether they want to restart. We could simple pass in the same command line again there, but nothing out of the box.
samirem
@samirem

Oh ok, so my best bet is something like this?

updateService.HandleUpdatesAsync();
if (updateService.IsUpdatedInstalled)
{
    System.Diagnostics.Process.Start(System.Windows.Application.ResourceAssembly.Location, Environment.GetCommandLineArgs());
    System.Windows.Application.Current.Shutdown();
}

I would also like a yes/no dialog to pop up with a message like "The application was just updated. Would you like to restart it now?", sorry for my newbish question but which way is easiest to do this?

Nevermind my question about the Yes/No-dialog, I found it here in the docs:
if (await messageService.Show("Are you sure you want to do this?", "Are you sure?", MessageButton.YesNo) == MessageResult.Yes)
{
    // Do it!
}
Geert van Horrik
@GeertvanHorrik
correct, something like that
but then use the IProcessService
we show a less intrusive icon in the status bar, then it's up to the user to either restart now or just do it on the next run
samirem
@samirem
That sounds like a very good idea. It's not nice to throw "annoying" messages in the end-users face
IProcessService instead of System.Diagnostics.Process.Start?
Orc.Notifications to show the status bar icon?
Geert van Horrik
@GeertvanHorrik
Orc.Notifications shows a desktop notification
we have a separate statusbar that simply watches this service as well and toggle visibility on an icon
samirem
@samirem
@GeertvanHorrik at first startup after installation my app gets a CrashWarningWindow, do you know why this could be?
Geert van Horrik
@GeertvanHorrik
This is something from Orchestra, happens if the app hasn't been started corretly previously
samirem
@samirem
yeah, but if the user does a fresh installation, the first startup of the application gives this window
Geert van Horrik
@GeertvanHorrik
that's not good. Do you initialize the %appdata% based on existing data?
this windows is being shown when %appdata%\company\product\started_failed.txt exists
samirem
@samirem
hm, that catalogue should not exist prior to installation, and I'm only adding the "standard" squirrel files/catalogues during installation
Geert van Horrik
@GeertvanHorrik
if you run the app twice, it could be instance 1 still starting up
and the 2nd instance showing this window
but I have no details about logging, et
samirem
@samirem
yeah maybe
as far as I know, at the end of squirrel installation the app is started
and then in my application I run the "SquirrelHelper.HandleSquirrelAutomatically();" to check if the app was just installed
that shows the window from Orc.Squirrel.Xaml, with a "run" button to run the app
Geert van Horrik
@GeertvanHorrik
that all looks good
samirem
@samirem
and when my user press this button, then the problem occurs
Geert van Horrik
@GeertvanHorrik
what you can do is enable debug logging for your app
in app config, add this
  <configSections>
    <sectionGroup name="catel">
      <section name="logging" type="Catel.Logging.LoggingConfigurationSection, Catel.Core" />
    </sectionGroup>
  </configSections>

  <catel>
    <logging>
      <listeners>
        <!--TODO: the line below must be commented out in stable release-->
        <!--<listener type="Catel.Logging.FileLogListener" IgnoreCatelLogging="true" IsDebugEnabled="true" IsInfoEnabled="true" IsWarningEnabled="true" IsErrorEnabled="true" />-->
      </listeners>
    </logging>
  </catel>
then you can easily uncomment the line when you want debug logging in production
samirem
@samirem
What should I look for in the log file? (i.e., what namespace produces the startupfailed.txt file?)
Geert van Horrik
@GeertvanHorrik
something in orchestra, not 100 % sure
samirem
@samirem
16:52:08:757 => [DEBUG] [Orchestra.Services.EnsureStartupService] [1] Creating fail safe file check
16:52:08:758 => [DEBUG] [Orc.FileSystem.FileService] [1] Creating file 'C:\Users\SESAEM\AppData\Roaming\Construction Software\Continuous Beam\startupfailed.txt'
nothing strange before this
oh wait a second, it seems like my second app starts before my first app has closed, like you pointed out
samirem
@samirem
my app is doing a lot of startup stuff even after this line:
16:52:05:939 => [INFO] [Orc.Squirrel.SquirrelHelper] [1] Closing application
Should it not break the startup process here and shut down asap?
Geert van Horrik
@GeertvanHorrik
your app should shut down, but not sure if it's something that's done automatically or whether you should be doing that
it's something we embed in our apps by default, so a long time ago when we wrote this
samirem
@samirem

@GeertvanHorrik
It seems that the "IsUpdatedInstalled" is never set to true, even if the application was updated.
https://github.com/WildGums/Orc.Squirrel/blob/develop/src/Orc.Squirrel/Orc.Squirrel.Shared/Services/UpdateService.cs#L210

In my observations, the exit code is always 0, even if the application was successfully updated.

Geert van Horrik
@GeertvanHorrik
Correct, we use a custom build of Squirrel with exit codes that make sense
samirem
@samirem
Oh cool, is this available for me to use as well?
Geert van Horrik
@GeertvanHorrik
if you want, yes
but I didn't have a lot of time to keep it up-to-date to be honest, so it's a bit outdated, but works great for us