I have managed to get an XAF application into the Windows Store via the Desktop Bridge.
When a user installs my software from the Windows Store and then chooses to uninstall, I want them to have the option to completely uninstall the software including the database. So that they won't have any problem should they later decide to re-install?
Currently, the UWP uninstall does not give an option to delete the database ( or even explain how to delete it ) Thus the user may be tempted to delete the data files via Windows Explorer - which still leaves some instance of LocalDB maintaining an entry in its list of databases.
Thus on a second install after deleting the database files, the UWP program displays the error
"Login failed for user"
As explained in this question
My connection string is using
(localdb)\mssqllocaldb
How do I automate removing the database and memory of it completely?
i.e What uninstall event can I use, What do I override where?
I can't see any executable code in the Desktop Bridge itself.
At the moment I think I may need to put "Run This Before You Uninstall" option in the actual program.
Or perhaps as a workaround, I should code a Clean Up handler for the "Login failed for user" error.
I am using Entity Framework 6.2 and .Net Framework 4.7.2
The Bridge Project is using Windows 10, version 1809, Build 17763 ( Min and Target)