F # library in Silverlight application?

I have an F # library in the same solution as a Silverlight (C #) project that I would like to use in the library. When I try to add a reference to a library project, it says I can only add Silverlight references. How can I make this F # library compatible with my Silverlight project?

I am using Visual Studio 2010.

+2


a source to share


2 answers


You need to start with the "F # Silverlight Library", not the "F # library".



+3


a source


F # compiler automatically creates an assembly for a non-standard execution environment (eg, Silverlight and Compact Framework), if you refer to the corresponding (non-standard) version of the assembly mscorlib.dll

, and FSharp.Core.dll

in the F # project. The Silverlight build version can be found here (on my machine):

C: \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework \ Silverlight \ v3.0 \ mscorlib.dll C: \ Programs \ Development \ FSharp-1.9.9.9 \ Silverlight \ 2.0 \ Bin \ FSharp.Core.dll



This is a more convenient replacement for the parameters --noframework

and those --cli-root

mentioned in the question referenced by Pretzel.

+2


a source







All Articles