hubFS: THE place for F#

. . . are you on The Hub?
Welcome to hubFS: THE place for F# Sign in | Join | Help
in Search

F# 1.9.4.15 and Silverlight 2.0 beta 1

Last post 09-01-2008, 7:01 by Josquin. 6 replies.
Sort Posts: Previous Next
  •  05-07-2008, 0:29 5881

    F# 1.9.4.15 and Silverlight 2.0 beta 1

    Hi there. I am trying to compile an F# module to target Silverlight 2b1 and have hit a brick wall. The F# file "hello.fs" contains no code, and I get the following error,
       

    Implicitly referencing 'C:\Program Files (x86)\Microsoft Silverlight\2.0.30226.2\System.dll'...

    Typecheck implementation Hello

    Note, optimizations are off.


    FS0193: internal error: the module 'System.Net' from compilation unit 'System' did not contain the module/namespace 'Net'


    FS0193: Not_found


    The command line is

    fsc.exe  --fullpaths --progress -a -Ooff -g -o "hello.dll" --no-framework --clr-root "C:\Program Files (x86)\Microsoft Silverlight\2.0.30226.2" --no-mllib "hello.fs"

    Note that System.dll is referenced, even though the --no-framework option is specified. I have tried also referencing System.Net but to no avail.

    Any help appreciated.

    Thanks,
    Andrew.
  •  05-08-2008, 10:37 5885 in reply to 5881

    Re: F# 1.9.4.15 and Silverlight 2.0 beta 1

    planetmarshalluk:

    FS0193: internal error: the module 'System.Net' from compilation unit 'System' did not contain the module/namespace 'Net'


    FS0193: Not_found



    Some digging with ildasm reveals a reference to System.Net.WebResponse in FSharp.Core.dll, which in .NET is defined in System.dll but in Silverlight is defined in System.Net.dll. Could this be the problem? If so, can anyone suggest a workaround?  Merely adding -r System.Net.dll to the command line does not work.

  •  05-09-2008, 3:42 5887 in reply to 5885

    Re: F# 1.9.4.15 and Silverlight 2.0 beta 1

    You need to recompile FSharp.Core.dll against the Silverlight framework assemblies. A moderately annoying task since fslib somtimes references method overloads that are not in Silverlight.

    Anyway I have done the recompile and it seems to work. With permission from Microsoft I'll post the binary here or contact me privately.

  •  05-29-2008, 20:33 6034 in reply to 5887

    Re: F# 1.9.4.15 and Silverlight 2.0 beta 1

    I got the same error
    Is there any other solution?
  •  05-30-2008, 3:24 6036 in reply to 6034

    Re: F# 1.9.4.15 and Silverlight 2.0 beta 1

    colder:
    I got the same error
    Is there any other solution?


    I reverted to version 1.9.2.9, which works. The problem with recompiling the sources is that the licence terms do not permit redistribution, which rather defeats the object of Silverlight.

    I reported the issue to Don Syme who kindly passed on a bug report.

    Amdrew.
  •  07-18-2008, 17:07 6410 in reply to 6036

    Re: F# 1.9.4.15 and Silverlight 2.0 beta 1

    In the 1.9.4.19 minor update we removed a method that depends on System.Net. Please let us know if that improves things here (we believe it should)

    thanks

    don

  •  09-01-2008, 7:01 6786 in reply to 5887

    Re: F# 1.9.4.15 and Silverlight 2.0 beta 1

    I would be very interested in getting the Silverlight-Compiled Core-Dll. I have been working on a small component for a silverlight application prototype and would like to test that without having to rewrite it in C#. I will have to do that anywayeventually , but I'd just like to postpone that as much as possible.

    cheers

    Mathias
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems