F# Default Cocoa Project Not Building on El Capitan

I have the latest Xamarin Studio beta installed from here: http://releases.xamarin.com/ (cycle 6 RC 3)
I'm running the latest El Capitan (10.11.1) and XCode (7.1.1).

When I create a new F# Cocoa Mac app and attempt to build, I get the following errors:

FSC: Error FS0219: The referenced or default base CLI library 'mscorlib' is binary-incompatible with the referenced F# core library '/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/gac/FSharp.Core/4.4.0.0__b03f5f7f11d50a3a/FSharp.Core.dll'. Consider recompiling the library or making an explicit reference to a version of this library that matches the CLI version you are using. (FS0219)

FSC: Error FS0218: Unable to read assembly '/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/gac/FSharp.Core/4.4.0.0__b03f5f7f11d50a3a/FSharp.Core.dll' (FS0218)

Has anyone else run into this? Is there a known workaround? Any help would be appreciated.

Posts

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    What branch area you on? Alpha? Stable?

    FSharp is an area I plan on adding some regression tests this cycle on, we've shipped regressions on it more times than I would like.

  • IngmarGagenIngmarGagen USMember

    Hi Chris, I'm currently on the alpha channel, but I've tried all 3 channels and it seems to be happening on all of them.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    I filed a bug here: https://bugzilla.xamarin.com/show_bug.cgi?id=35851

    It's too late on Friday for me to dig into it, but I'll take a look early and week and get back to this thread.

  • IngmarGagenIngmarGagen USMember

    Ok, thanks Chris!

  • Same issue here. When I replace it with a .NET 2.0 compatible version of FSharp.Core I do get it to build.
    If you have an older Mono laying around look here: /Library/Frameworks/Mono.framework/Versions/3.12.1/lib/mono/gac/FSharp.Core/2.3.0.0__b03f5f7f11d50a3a/FSharp.Core.dll

  • Another way I just found is to switch to "Xamarin.Mac.NET 4.5", delete FSharp.Core and simply get the latest via NUGet!

  • IngmarGagenIngmarGagen USMember

    @HansWurst.7762 Thanks for the tip! I don't have any older versions of FSharp.Core but I was able to switch the project to .NET 4.5 and update FSharp.Core via NuGet as you said, and the default project built and ran. I'm still hoping this issue gets fixed in the default Xamarin.Mac build, but this is a good workaround for now.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    Hey guys. Sorry for the delay in getting back to you.

    I've tracked down the problem and working on a fix now. Once a build machine chews on it, I'll post a package here for people to try / work around the issue.

    We're also going to look at how this regression slipped by and patch that hole so it doesn't happen again. Apologies for the trouble.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai
    edited November 2015

    edit Wrong thread. Sorry.

    And the package is being uploaded now, so I should have a package to test today.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    Here's a version of what's on stable with an additional fix to re-enable the bits needed to use F#.

    http://files.xamarin.com/~chamons/xamarin.mac-2.4.0.110-fsharp.pkg

    Please test it out, and let me know how it goes @IngmarGagen @HansWurst.7762

  • IngmarGagenIngmarGagen USMember

    That's great news. Thanks for following up and looking into this. I'm glad to hear that F# support is a priority :)

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    We've been working to improve F# support in general, and this worked in C5, so regressing like this is unacceptable.

    I've been working on some behind the scenes stuff to prevent this from reoccurring.

  • IngmarGagenIngmarGagen USMember

    Ok, I just installed the 2.4.0.110 package you linked to and I was able to build and run a new F# cocoa project.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    It was a very small "fix" on our end. I would expect it to make the first service release (SR1).

  • IngmarGagenIngmarGagen USMember

    Ok great, I'll keep an eye on the releases and stick with this build for now.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    Hey guys, due to a mistake on my end, this fix "missed" the first alpha release of SR1. It however will be fixed when that moves to the Beta channel.

    The pkg I linked should still be considered the work around of choice until that occurs.

    Sorry for the trouble.

  • IngmarGagenIngmarGagen USMember

    Ok, thanks for the update. Glad to hear it will make it into the beta channel soon.

Sign In or Register to comment.