dotnet / deployment-tools

This repo contains the code to build the .NET deployment tools and installers for all supported platforms, as well as the sources to .NET deployment tools.
MIT License
169 stars 50 forks source link

Pinned taskbar app is orphaned after update #74

Open desjarlais opened 3 years ago

desjarlais commented 3 years ago

Scenario: I publish a .NET 5 app using ClickOnce and then pin the app to the Windows taskbar. After pinning to the taskbar, if I update the app, it will be orphaned to the old version. The Start Menu app icon works fine after the update, it just seems to be the taskbar. Is there any way to work around having to unpin/repin the app icon post update?

johnthom commented 1 month ago

As a temporary work-around I have have added code in program.cs to look for the environment var "ClickOnce_IsNetworkDeployed" which is only set when the app is launched from the original appref-ms link. If this var is NOT set then the work-around will "Process.Start" the app using the original appref-ms from the Start Menu and then exit. This keeps the user running the launcher and not the app.exe directly which in turn will continue to handle update checking. All this is completely transparent to the user.