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.
When project files are on a Windows dev machine (because of TFS) and an attempt is made to access them via a SMB share. Frequently, when and attempt is made too save a file, MonoDevelop instead prepends a ".#" to the filename (for example, TaskInfo.cs becomes .#TaskInfo.cs) and saves it with the new filename without notification. The changes are then not reflected when I build the project.
If the file in question has the NTFS ReadOnly attribute, MonoDevelop will reliably produce this behavior. TFS seems to likes to flip this attribute on whenever it checks a file in.
Possibly a issue with SMB, which is then causing the .# in the file names.
The reason it does this is so it can ensure the file is written atomically. It writes to this new file, then performs an atomic move over the old file.
It's possible these files are getting left behind, if TFS is setting the "real" file to readonly and the atomic move is failing silently. MD should at the very least be giving an error. Possibly it should be flipping the readonly bit off the file before saving it.
As said the .# is by design for security reasons (no data losses caused by blackouts :)).
I fixed the issue by showing an error message that allows you to overwrite the file.