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.
The F# Forms Shared template does not add the FSharp.Core NuGet package to the Android project so the app does not compile out of the box. This is required now because Xamarin.Android 7.4 removed the FSharp.Core dll.
iOS is not affected because the dll is still shipped with Xamarin.iOS. The PCL template does not have this issue because it finds the dll from the PCL project, but it might still be worth referencing the package in that template as well.
### Steps to Reproduce
1. Create a new F# Forms Shared template solution
2. Build the Android project
### Expected Results
The project builds successfully.
### Actual Results
The build fails with
> Error: Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'FSharp.Core, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
### Version Test
VS for Mac 7.1 build 1281
Adding the FSharp.Core 184.108.40.206 NuGet package, which is used in the other Android projects, seems to cause the Android project to fail to build.
FSC : error FS0219: The referenced or default base CLI library 'mscorlib' is binary-incompatible with the referenced F# core library '~/Projects/Tests/awegaewg32gweweg/packages/FSharp.Core.220.127.116.11/lib/portable-net45+monoandroid10+monotouch10+xamarinios10/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.
FSC : error FS0229: Error opening binary file '~/Projects/Tests/awegaewg32gweweg/packages/FSharp.Core.18.104.22.168/lib/portable-net45+monoandroid10+monotouch10+xamarinios10/FSharp.Core.dll': The referenced or default base CLI library 'mscorlib' is binary-incompatible with the referenced F# core library '~/Projects/Tests/awegaewg32gweweg/packages/FSharp.Core.22.214.171.124/lib/portable-net45+monoandroid10+monotouch10+xamarinios10/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.
The command exited with code 1.
The non-Xamarin.Forms Android projects that have the same FSharp.Core NuGet package reference compile without any errors.
Updating to the latest stable FSharp.Core 4.2.1 causes a different build error, plus installs a load of extra NuGet packages since it uses .NET Standard.
Right, I forgot to mention that in addition to including the package from NuGet, you need to add
<Reference Include="mscorlib" />
in the Android csproj otherwise you get that error in comment 1.
Thanks, Jimmy. That is why the other Android projects are working. The non-Forms Android projects all have the mscorlib reference.
Fixed in version 126.96.36.199 (master)
Author: Matt Ward
Commit: 8c600ca9aced67485e77bd51973073863996718f (xamarin/md-addins)
Included in Commit: 1af8735d73a07bcfb602ac257384c0527981b3ea (mono/monodevelop)
Fix for d15-4 branch:
Fixed in version 188.8.131.528 (d15-4)
Author: Matt Ward
Commit: e67debf4a9c0c9c955dc53e715832295822a0b34 (xamarin/md-addins)
Included in Commit: e74d1e0c280ed6f01dead8dc60afd98ef94af74b (mono/monodevelop)
*** Bug 59073 has been marked as a duplicate of this bug. ***
*** Bug 59879 has been marked as a duplicate of this bug. ***