Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 13664 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
The IsolatedStorageFile.GetMachineStoreForXYZ methods throw this exception because the root path for the machine stores resolve to /usr/share/.isolated-storage.
I'm not sure if this is correct, but the concept of machine storage on Mac seems wrong to begin with.
Firstly, machine storage shouldn't use a dot-directory, and the root path should probably be /usr/local/share/mono or /Library/Mono and not /usr/share. /Library/Mono/IsolatedStorage or /usr/local/share/mono/isolated-storage is probably best, and any directories and files created therein should be made world readable/writable I guess (so the same application running under different users can access the files in the same way).
Note that similarly on Mac, ~/.config/.isolated-storage is not ideal. It should probably be ~/Library/Mono/IsolatedStorage. I'm not sure why .isolated-storage is a dot directory at all.
Conceptually I'm unsure of the "right" thing to do here on Mac. Sharing data across multiple user accounts is a little strange and very technically cumbersome. At best we'd have to instrument the system-Mono installer to set up the right permissions on the Machine Storage directory.
However, the problem can't be fixed for cases where the system-Mono is not used or pre-required (e.g. your application links in and bundles the Mono runtime), since the application itself (run by the user) could not elevate (without lots of extra per-application code) to root/admin privileges to even create and set up the machine storage directory if it were not already set up (and it likely would not be).
I'm thinking maybe for Mac (and probably Linux) we just treat Machine and User storage as the same thing inside the user's home directory.
Apple certainly doesn't want .apps from the store mucking around outside of $HOME or any other further sandboxing (speaking of sandboxing..., effectively hardcoding ~/.config/.isolated-storage  is probably a big no-no).
 Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData) even resolving to ~/.config is terrible practice on Mac, which is the basis of the root path resolution for IsolatedStorageFile. Other SpecialFolders are similarly bad.
My recommendation is that we fix this as part of our Mobile Profile.
This would ensure that existing apps do not break, and we could add an environment variable or configuration option to go back to the old version.