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 a reference to a .net assembly is added, MonoDevelop uses a relative path to it inside .csproj. This works fine if the assembly is in the solution directory, as it will not "move". If it's outside the solution, however, this makes the .csproj tied to the location on filesystem. If an assembly from outside the solution is referenced MonoDevelop should use absolute path instead.
Then you make it OS dependent, and different from what VS does?
It might be OS-dependent but at least it makes the project work anywhere on the disk on the same system. Relative path means that if you move your project on your own disk, you have a broken reference. Perhaps MonoDevelop should warn about the assembly being from outside the solution and offer to make a private copy of it somewhere in the solution? And I don't buy the "different from what VS does" argument :)) - VS doesn't do everything right and we should have a mind of our own :)
VS compatibility is a perfectly cromulent argument when discussing the project file format. We don't want to churn the file when using it from both MD and VS.
And sure, if you use absolute paths, then some things will work better when you move the project - things with well-known locations, or things on the same system that did not move. But consider the case where you have a a solution that references files in sibling folders. Relative paths make that work when you move whole set of folders, or when you check out the same folder structure on a different machine.
The only things that are normally referenced "from the system" are assemblies and those that *are* referenced from the system are resolved by name, not by path. Assemblies that actually need the HintPath are more likely to be resolved from a directory of binaries local to the project, and hence would benefit from relative paths.
A path being relative or absolute is not part of the file format, it's its content. Since we use DOS-style paths in the file anyway, I don't see how this change could affect the VS ability to parse and use the file (except for the location, of course).
You have a point on the sibling projects, however this case begs for asking the user what to do with such a reference, which kind of path to use. This is a matter of opinion, so it should be an option.
Regarding the "from the system" assemblies - sure, provided that _all_ of them can be referenced that way, which is not the case in MD. I understand your point about the i18n assemblies not being "standalone" per se, but they do live in the public framework profile directory and so they should be offered for referencing. Maybe this is the fix we need - to make MonoDevelop more consistent in this department?