Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FSharp.Core for Windows Phone 7.1 and F# 3.0

The F# 2.0 distribution had a version of FSharp.Core compiled for WindowsPhone 7.1/Silverlight 4, but F# 3.0 doesn't, and the portable version only supports Silverlight 5 or Windows Phone 8. Has anyone been able to compile a version of FSharp.Core for F# 3.0 targeting Silverlight 4 or Windows Phone 7.1 from source? What are the defines required?

Edit:

On the fsharp compiler github repo, there's a target named portable-net4+sl4+wp71+win8, but in reality that's portable class library Profile47, which supposedly only support .NET 4.5, Silverlight 5.0 and Windows Store apps. It's the same as what's installed with VS2012. If you try to use it with a WP 7.1 project, it will fail at runtime complaining about missing IStructuralEquatable. It should really be named portable-net45+sl5+win8. There's a wp7 target also in the proj files, but it's currently not compiling

like image 229
Gustavo Guerra Avatar asked Feb 04 '13 20:02

Gustavo Guerra


2 Answers

I managed to compile it, but since I don't normally use F#, I don't know how to test it. Have you followed the instructions for compiling? Just type the following commands in the VS Developer Prompt

cd src
msbuild fsharp-proto-build.proj
msbuild fsharp-library-build.proj
msbuild fsharp-compiler-build.proj
msbuild fsharp-library-build.proj /p:TargetFramework=portable-net4+sl4+wp71+win8

Note that I did it with Visual Studio 2012 Professional. If you want, I can send you compiled dll and you can try it.

like image 126
Toni Petrina Avatar answered Nov 15 '22 00:11

Toni Petrina


Got both the wp7 target and Portable88 target compiling from F# source after a couple of changes https://github.com/ovatsus/fsharp

Still need to thoroughly test at runtime, though

like image 1
Gustavo Guerra Avatar answered Nov 14 '22 23:11

Gustavo Guerra