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.
Created attachment 6148 [details]
Path.Combine bug test project
System.IO.Path.Combine is broken in 188.8.131.52. The behavior was fine in 7.0.6 and 7.0.7 Beta.
The following simple test fails:
var Path1 = "/foo";
var Path2 = "/bar.txt";
var path = Path.Combine( Path1, Path2 );
// Expected path is /foo/bar.txt
System.Diagnostics.Debug.Assert( path.Equals( Path1 + Path2 ), "Path.Combine() failure" );
I have attached a repro project as well. It fails both in the simulator and on the device.
There have been recent changes to Path.cs in mono master that may be related to this issue:
Xamarin Studio: 4.2.3
I just tried this on Windows with .NET, and it fails there too.
Maybe the regression is somewhere else?
I also tried with 184.108.40.206, 220.127.116.11, 7.0.6 and 7.0.5, and they all fail too.
The most recent change to Path.Combine is only in master (not in 7.0.7). Previous ones are quite older.
You are right. After reviewing MSDN documentation and testing previous Xamarin iOS versions this is in fact the intended behavior of Path.Combine. The second string must contain a relative path and not an absolute one.
Sorry for the false alarm.