I am new to F#. I get the following error when I attempt to build my F# project in Monodevelop:
/home/greenrd/git/hello/hello: Error FS0229: Error opening binary file '/usr/lib/mono/4.0/../../../../../usr/lib/mono/gac/kde-dotnet/4.1.0.0_194a23ba31c08164/kde-dotnet.dll': Could not find a part of the path "usr/lib/mono/gac/kde-dotnet/4.1.0.0_194a23ba31c08164/kde-dotnet.dll". (FS0229) (hello)
I don't think this is due to the 260 character file path limit in .NET, for the simple reason that the file path is only 102 characters. What could be the problem? file
says:
/usr/lib/mono/4.0/../../../../../usr/lib/mono/gac/kde-dotnet/4.1.0.0__194a23ba31c08164/kde-dotnet.dll: PE32 executable (DLL) (console) Intel 80386 Mono/.Net assembly, for MS Windows
I don't even know where this filename comes from, I didn't enter such a strange filename anywhere. All I did was add the KDE C# bindings as a reference to the project.
This looks like a bug in the compiler when there are more ..
than required - it looks like in this case the compiler drops the leading slash.
Changing the reference to
/usr/lib/mono/gac/kde-dotnet/4.1.0.0__194a23ba31c08164/kde-dotnet.dll
works just fine.
I am trying to chase this error up. Hopefully I will have a compiler patch today or tomorrow.
So after chasing a whole stack of functions in the compiler, it turns out this is actually a mono bug. This simplest way to reproduce it is
new FileStream("/../bin/bash",FileMode.Open,FileAccess.Read,FileShare.ReadWrite);;
which should work, but doesn't.
Reported to mono: https://bugzilla.xamarin.com/show_bug.cgi?id=17083
EDIT: This is apparently fixed in the latest mono - https://bugzilla.xamarin.com/show_bug.cgi?id=17083