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 on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
MonoDevelop.Ide.TextFileProvider has big problems.
* It doesn't handle encoding.
* It doesn't perform atomic writes.
Using MonoDevelop.Projects.Text.TextFile instead of System.IO.File would fix this.
The API also has serious perf problems - on each insertion/deletion, it writes the whole file to the disk. Oddly, if the whole file is changed by setting the Text property, it's not written.
Fixed the first 2 items in git master, but not the perf problem.
The text file provider API should never be used. I suggest using always a TextDocument for doing text changes.
It provides a rich API for handling common document operations (lines/columns model, diffing, searching etc.)
And for reading/writing text files the TextFileUtility class from the text editor. It has atm the best encoding detection we have in monodevelop.
Then we should change the ITextFileProvider API to provide a TextDocument. It has an important purpose - transparently editing a file whether it's on disk or open in the text editor.
This seems to be fixed.