I am working on a dotnet application in C# (donet 6.0, WPF, targeting win 10 2004 and newer), that is wrapped into a Packaging project and pubished via ms-appinstaller. The application should usually run in background and only show some UI, when the user opens it via TrayIcon. Unfortunately I did not find any newer approach then using WinForms for the TrayIcon. As the user may want to quickly interact with the TrayIcon, we recommend to drag the TrayIcon to the always visible part in the Taskbar (I realized, that there is no API to do this in Code, because Microsoft wants a clean Taskbar and avoid spamming it).
Now to the strange behavior: The user can move the Icon himself and make it always visible, this also automatically enables a switch in the windows settings (customization > taskbar > other taskbar icons). But, after installing an update for the application (via appinstaller or PackageManager API), this setting is always reseted, and the icon jumps back into the hidden area. Everything in the new package hopefully stays the same (name, publisher, certificate, ProjectGuid, ... ), the package also correctly migrates the application settings. Only this one windows setting seems not to be kept, when upgrading the application. Does anybody have an idea, how to solve this or what I could have made wrong?
Thanks for some hints.