Closed remco1271 closed 1 year ago
I can not access the link you shared, is the repo private?
Its now public
https://user-images.githubusercontent.com/1287295/235320142-f8805cce-531f-499f-a76f-46136215d2bb.mp4
I have tested the project you uploaded and it appears to be working completely fine.
This all appears to be expected behavior. If you see something happening which is different to my video, or if you are not understanding something about this please let me know.
Did test it again. On my desktop it works like yours but on my laptop it runs like the video below. Do see multiple .NET 6.0 versions installed. On my desktop I have only 6.0.16. Will give tomorrow a try to remove the older versions to see if that is the problem.
PS C:\Users\Remco> dotnet --list-runtimes
...
Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
...
https://user-images.githubusercontent.com/6353023/235322524-9ffb0390-6ba0-476d-855c-014c387570cf.mp4
That's interesting, hard for me to assess as I can not reproduce the problem.
I'm not at visual studio so the following may not compile but can you add something similar to this in your application and share the results? It will just log the command line arguments every time your exe is launched. May help us track down the issue.
File.AppendAllText(Path.Combine(AppContext.BaseDirectory, "cli.txt"), DateTime.Now.ToString() + " -- " + Environment.CommandLine + Environment.NewLine);
If you could add it as early as possible in your app start up (the top of App.cs constructor is fine)
Here the cli.txt in the "app-2.1.54" folder
05-05-2023 18:51:21 -- "C:\Users\RemcoFischer\AppData\Local\CanBus_Monitor\app-2.1.54\Bus Monitor.dll"
05-05-2023 18:51:33 -- "C:\Users\RemcoFischer\AppData\Local\CanBus_Monitor\app-2.1.53\Bus Monitor.dll" --squirrel-obsolete 2.1.53
the "app-2.1.55" folder
05-05-2023 18:51:31 -- "C:\Users\RemcoFischer\AppData\Local\CanBus_Monitor\app-2.1.55\Bus Monitor.dll" --squirrel-updated 2.1.55
I do see a splashscreen at 18:51:31 and 18:51:33 when it should not be there. I did put the windows clock visible with seconds
Is this still an issue for you?
Did solve it by looking at the passed arguments at start
I have a splashscreen in my program that pops up:
I did give it a try to put the spashscreen in OnAppRun() to let it only run when the program is started by the user, but it still shows it. Is there a check that I can do to make sure it only shows on startup and not when it is started by the updater?
Example: https://github.com/remco1271/Splashscreen-Demo Squirrel version: 2.9.42