I have a Visual Studio 2019 solution with my app project and an MSIX project. To "publish", I just use MSIX -> Publish -> Create App Packages -> Sideloading. The cert I use for signing is a temp self-signed cert that VS created.
Apparently, the source of the problem is how the resulting msixbundle get installed.
In my example above, user.config for version 2.0.0.0 gets written to
.../LocalCache/Local/.../App_Url_sfq33ivn4e0a1gnv0fnvxm5k421iqybb\2.0.0.0
But when I create version 2.0.1.0, build a new msixbundle and update to the new version, user.config for version 2.0.1.0 is in
.../LocalCache/Local/.../App_Url_jmygyyawvvmdg51cvztao3w12rgeuu0u\2.0.1.0
The parent directories are different. If I copy user.config 2.0.0.0 into the same directory as 2.0.1.0 (App_Url_jmygyyawvvmdg51cvztao3w12rgeuu0u) then the upgrade works.
So the question now is, why does the MSIX installer use different directories? That means each version of the app has its own directory. Why? Is this because I'm sideloading? Is there something in the MSIX project I need to set to prevent this from happening?
Thanks