Application-specific directories are erased when deploying android application
My environment :
Visual Studio Community 2022 Version 17.5.4 and Xamarin 17.5 (Xamarin.android SDK 13.2)
Target platform android 12.1 (Samsung phone)
When I deploy a project to my phone via USB connection, application specific directories are sometimes erased.
This application-specific directories erased are documents directories ContextWrapper.GetExternalFilesDirs(null)[0 or 1].AbsolutePath, ie
- /storage/0123-4567/Android/data/Myapp/files
- /storage/emulated/0/Android/data/Myapp/files.
Sometimes only files are erased, sometimes directories cache and files are itself erased (I don't use others specific directories).
I am an occasional user of Xamarin. I had never encountered this problem before.