Home

Make it so when I update LINQPad, it uses the same taskbar icon

Every time I update LINQPad, the new version of LINQPad opens with a different icon in my taskbar so I always have to unpin the old version and pin the new version. It would be really nice if I didn't have to do this every time LINQPad updates.

Thanks! :)

Comments

  • This effect is temporary: next time you start LINQPad, it should return to its original position on the taskbar.

  • Would it be possible to change the startup process so that when there is a pending update, the next time linqpad is attempted to be run, it applies the update then restarts automatically? Similar to other apps. I know it is minor and temporary, but it is confusing if you're not aware of it. It confused me for a long while til I realized that's what it did.

  • That's not easy to do. To make this work while ensuring that the update could still proceed if denied administrative elevation would require moving a fair bit of code to the launchers, which are written in C++.

  • edited January 2023

    Hi Joe. I just updated to the latest version and the behavior you described above is not what is happening for me.

    My existing icon in the tray is pointing to:
    C:\Users\HAWS002\AppData\Local\LINQPad\Updates7.AnyCPU\7.5.16\LINQPad7-x64.exe

    After updating and closing LINQPad and reopening it from the tray icon opened a new tray icon that is pointing to:
    C:\Users\HAWS002\AppData\Local\LINQPad\Updates7.AnyCPU\7.6.6\LINQPad7-x64.exe

    No matter how many times I open and close linqpad, my tray icon is not getting updated to point to the new location so it is always opening it as a new tray icon.

    Also, while the above is using an installed version of LINQPad, I would prefer to use the portable version of linqpad but it's auto-update feature installes linqpad instead of updating the portable version of the app. I would love it if this could be changed :)

  • Looks like it's unable to update the calling executable. Take a look in %localappdata%\LINQPad\logs.LINQPad7\log.txt - are there any entries that could be related to this?

  • Yes, there are are a lot of errors in there: https://pastebin.com/hNR5G6ZB

  • Strange - there are no entries after 2022-07-26.

  • Ah, sorry, I didn't even look at the dates.

    Something to note, if I remember correctly, I never manually installed linqpad. I ran the portable version and it auto-updated which installed it on my computer. Maybe that scenario breaks something?

  • The update patcher is designed to work with portable installs as well. There are two things that will disable it: insufficient permissions to update all the files, and the folder being named according to the version. So if you've running LINQPad from a folder called 7.6.5, it will keep those files at 7.6.5 and not update them to 7.6.6. Everything else should be recorded in the log.

  • Hmm. The way I tried to install it is in my one drive directory. In my one drive directory I have:

    • apps folder which I have setup to always be accessible offline so all of the files are synced
    • apps\linqpad5 for the .NET Framework portable version
    • apps\linqpad7 for the .NET portable version

    I could maybe understand having this issue on my work computer because I have to request admin permissions and they are temporary (3 hours), but this issue happens on my personal computer as well which I am an admin on.

    The logs I sent you were from my work computer. My personal computer doesn't have anything in the log file.

  • I see what's happening now. Your old tray icon was pointing to C:\Users\HAWS002\AppData\Local\LINQPad\Updates7.AnyCPU\7.5.16\LINQPad7-x64.exe

    You need to point it back to apps\linqpad7. After the next update, don't re-pin the icon when it creates a new icon - the problem will fix itself on the next run.

  • edited February 2023

    So I received the latest 7.7.1 upgrade today and here are the results:
    1. I opened linqpad 7 like normal using my taskbar shortcut which points to the portable version at:
    C:\Users\HAWS002\OneDrive\apps\dev\linqpad\v7\LINQPad7-x64.exe
    2. It told me to restart linqpad to upgrade to the latest version so I clicked restart
    3. The new version opened using a new taskbar item. Instead of pinning the new icon like I have in the past I followed your instructions and simply closed that linqpad instance and opened linqpad again using my taskbar shortcut which still points to my portable version
    4. It worked! It updated the portable version to the latest version. Yay!

    Something I did notice though is that the instance that opened after the upgrade (the one I closed without pinning) was pointing to C:\Users\HAWS002\AppData\Local\LINQPad\Updates7.AnyCPU\7.7.1\LINQPad7-x64.exe. Is there a reason that is linqpad installing itself into my appdata folder even though I am using the portable version? I feel like ideally it wouldn't write anything to appdata if I am using the portable version. It seems like everything should be self contained within the portable exe directory. I could understand caches being stored in a temp location, but this is the full exe of linqpad being stored in appdata as if it were installed, even though I specifically don't want it to be installed (hence why I am using the portable version).

  • LINQPad runs from the updates folder only once (or until it successfully patches the original). Note that in this scenario, the folder containing the launcher that you used to start LINQPad is still used as a base for all portablized files, so it shouldn't make any difference to how LINQPad operates.

  • Also note that I'll be making a change soon that will reduce incidences of the pinned taskbar issue - particularly with betas.

  • You should notice this improvement now taking effect when you auto-update from 7.7.11 to 7.7.12 or 7.11.13.

    The only time that a pinned taskbar item will now temporarily shift is if a launcher changes between versions.

Sign In or Register to comment.