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.
If a directory is right clicked and deleted from a project under version control, it does not vanish from the solution pane immediately.
This was an issue only when using the 'Add existing directory' command which failed to create a ProjectFile for the directory itself which resulted in this inconsistent state. Fixed in git master.
Are you sure this fix is correct? There is no requirement for a directory to have a ProjectFile - if the files within it are in the project, then the directory is implicit. In general, ProjectFiles for directories are only created when a new directory is created, a directory is added but the files within it are not, or when the last file is removed from a directory.
The code executed when a directory was deleted was checking for the existence of the corresponding ProjectFile and then removing it if it existed, so it appeared like the bug was simply that the 'else' was mismatched in this statement:
as the code added a ProjectFile for the new directory only if there was already a ProjectFile for the directory in the solution.
If the actual issue is simply that the treeview has not refreshed properly to clear out the stale empty directory then i can revert that fix and work on making the treeview refresh correctly when an implicit directory vanishes.
It looks like you fixed a problem, just not the problem you thought you were fixing :)
The if definitely looks like it was mismatched, I guess that code was intended to always add a ProjectFile for the directory even when the user chose not to actually import any files? Though TBH that would have made more sense to do later if the dialog returned Ok but had no selected files.