Where communities thrive


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

    github-actions[bot] on develop

    Bump Verify.NUnit from 19.8.1 t… Merge pull request #505 from Wi… (compare)

  • Feb 03 00:03

    github-actions[bot] on nuget

    (compare)

  • Feb 03 00:03
    github-actions[bot] closed #505
  • Feb 03 00:02
    dependabot[bot] labeled #505
  • Feb 03 00:02
    dependabot[bot] labeled #505
  • Feb 03 00:02
    dependabot[bot] opened #505
  • Feb 03 00:02

    dependabot[bot] on nuget

    Bump Verify.NUnit from 19.8.1 t… (compare)

  • Feb 02 00:02

    github-actions[bot] on develop

    Bump Verify.NUnit from 19.8.0 t… Merge pull request #504 from Wi… (compare)

  • Feb 02 00:02

    github-actions[bot] on nuget

    (compare)

  • Feb 02 00:02
    github-actions[bot] closed #504
  • Feb 02 00:02
    dependabot[bot] labeled #504
  • Feb 02 00:02
    dependabot[bot] labeled #504
  • Feb 02 00:02

    dependabot[bot] on nuget

    Bump Verify.NUnit from 19.8.0 t… (compare)

  • Feb 02 00:02
    dependabot[bot] opened #504
  • Jan 30 11:06

    dependabot[bot] on github_actions

    (compare)

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

    GeertvanHorrik on develop

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

samirem
@samirem
I'm developing an application where I'm gonna use Squirrel and Orc.Squirrel for deployment and automatic updates. I got this to work fine. But I'm also interested in setting up a file association on my target PC when installing the application. When I'm searching around how to set file associations for WPF applications, I only find examples using ClickOnce or other tools, but Squirrel does not seem to have this option as far as I can tell.
samirem
@samirem
Have you faced a similar situation and solved it somehow? Or do you have any idea how it could be done? I guess I could fork Squirrel and add some registry manipulation during installation, but honestly I'm very unexperienced and fear that it might not be easy enough. I also think that this should be a fairly easy thing to do..
Geert van Horrik
@GeertvanHorrik
See Orc.Fileassociation and run it at app startup
samirem
@samirem

My app has recently stopped updating automatically. I've been debugging a lot to try to find the problem. After enabling file logging and running the released exe, I found this line:

16:09:07:784 => [INFO] [Orc.Squirrel.UpdateService] [1] Automatic updates are disabled

Which must come from this:
https://github.com/WildGums/Orc.Squirrel/blob/develop/src/Orc.Squirrel/Orc.Squirrel.Shared/Services/UpdateService.cs#L157

Now, the strange thing is that I've not changed anything in my code.. can it possibly be some change in the ConfigurationService that breaks the behaviour?
My code for calling HandleUpdatesAsync() is as follows:

var updateService = serviceLocator.ResolveType<IUpdateService>();
var updateChannel = new UpdateChannel("Stable", "https://...");
updateService.Initialize(new[] {updateChannel}, updateChannel, true);
updateService.HandleUpdatesAsync(DateTime.MaxValue);
samirem
@samirem
I managed to solve it now by setting
configurationService.SetRoamingValue("AutomaticUpdates.CheckForUpdates", true);
but the "updateService.Initialize()"-method should already do this as far as I can tell
Geert van Horrik
@GeertvanHorrik
@samirem Did you recently update any packages (e.g. Catel or Orchestra)?
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?