Describe the bug
On macOS 10.15.4 old F# compiler (4.5) is used to build Xamarin projects.
Area for Triage:
Xamarin
Question, Bug, or Feature?:
Bug
Virtual environments affected
Expected behavior
Xamarin is being built with the latest F# 4.7.1 compiler
Actual behavior
F# 4.5 compiler is used
let x = {| A = 5 |}Hello @xperiandri , unfortunately, it is not something that can be fixed from image side.
F# 4.7 is available on image as a part of .NET Core
$ dotnet fsi
Microsoft (R) F# Compiler version 10.8.0.0 for F# 4.7
However, if you build Xamarin app, F# from Mono is used for build.
$ which fsharpc
/Library/Frameworks/Mono.framework/Versions/Current/Commands/fsharpc
$ fsharpc --version
Microsoft (R) F# Compiler version 10.2.3 for F# 4.5
The current stable version of Mono (6.8) is installed on image and it contains F# 4.5.
I also checked and it looks like that next version of Mono (6.10; still in-preview) still contains F# 4.5.
I was able to reproduce this issue locally. I can't build Xamarin F# app with anonymous record on my Mac.

Also I have found the same issue on developer community forum: https://developercommunity.visualstudio.com/content/problem/767546/f-47-language-features-dont-work.html
Ah, does that mean that it doesn't build on Mac at all without new Mono in preview?
As I mentioned above, looks like preview version of Mono still contains F# 4.5 :(
Yes, it means that Xamarin apps with F# 4.7 can't be built on Mac at all.
(I am not F# developer so I could be wrong, but based on my investigation, it is true).
I suggest to create an issue against Mono to clarify if they have any plans to update F# in future releases.
Well, as F# 4.6+ features are used only in .NET Core projects we found a workaround to build .NET Core project with dotnet build -o "$(build.binariesdirectory)/$(BuildConfiguration)" and dotnet build -o "Biblioteko.Mobile/bin/iPhone/$(BuildConfiguration)/netstandard2.0/" first and then use /p:BuildProjectReferences=false to build Xamarin projects
I am going to close this issue since it is not the image defect and unfortunately, we can't fix this issue from our side.
@Juriyx , thank you for provided work around. I think it can be useful for some people.
In general, I suggest to log issue against mono to update F#.
Most helpful comment
Well, as F# 4.6+ features are used only in .NET Core projects we found a workaround to build .NET Core project with
dotnet build -o "$(build.binariesdirectory)/$(BuildConfiguration)"anddotnet build -o "Biblioteko.Mobile/bin/iPhone/$(BuildConfiguration)/netstandard2.0/"first and then use/p:BuildProjectReferences=falseto build Xamarin projects