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 solution is opened from a directory that's actually a symlink to another directory, MD doesn't resolve the symlink, so all paths in MD will use the unresolved value.
However, the MacOS native "Open" dialog does resolve symlinks, so when you try to add existing files from the project directory, MD thinks they're outside the project directory and tries to copy/link/move them.
Since the "Open Solution" dialog is also native, then opened solutions should use resolved paths too. However, it it possible to reproduce this problem using "recently used" solution with the old path that had originally been opened by an older version of MD that did not have Mac native dialogs.
Note that Finder and "open" also appear to resolve symlinks.
OK, there's still a way to repro this. A newly created project can be created at an unresolved path, and the unresolved path will be persisted in the Recent Files list.
I added the ability to resolve symlinks to FileService so we can just call FileService.ResolveFullPath. On windows this is currently just a call to Path.GetFullPath. On unix systems it p/invokes libc to invoke 'realpath' which resolves symlinks. If this is not ok, a solution could be created using Mono.Posix and manually walking the path to check for symlinks.