Xamarin studio F#

HomeForumsMonoBrick EV3 FirmwareXamarin studio F#

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5258
    Author Image
    mtj_tj
    Participant

    Hey everyone

    I’m trying to create a program for the MonoBrick Firmware using F#.
    I want to be able to debug the program, should any exceptions occur and I’m therefore using Xamarin Studio with the Add-In.
    C# compilation and connection over WiFi works fine, but I cannot compile my F# programs when using Mono, it works fine when using .NET but then I can’t use the MonoBrick Add-In and thus have no debugging.
    I have created a new Solution using the MonoBrick Project and then added a new F# project to the solution.

    Does anyone have any experience with F# in Xamarin? I already have the F# Language Binding Add-in.
    I do not have another choice concerning programming language.

    My code is as simple as this:

    open MonoBrickFirmware.Display
    
    [<EntryPoint>]
    let main argv = 
    
        LcdConsole.WriteLine("Test")
    
        printfn "%A" argv
        0 // return an integer exit code
    
    

    And this is my stacktrace when using Mono:

    Building: ftester (Debug|x86)
    Performing main compilation...
    C:\Program Files (x86)\Mono\bin\fsharpc --noframework --nologo
    --target:exe
    --out:"C:\Users\XXX\Documents\Projects\monotest\ftester\bin\Debug\ftester.exe"
    --noframework
    --define:DEBUG
    --debug+
    --optimize-
    --tailcalls-
    -r:"C:\Program Files (x86)\Mono\lib\mono\4.0\FSharp.Core.dll"
    -r:"C:\Program Files (x86)\Mono\lib\mono\4.0\System.Core.dll"
    -r:"C:\Program Files (x86)\Mono\lib\mono\4.0\System.dll"
    -r:"C:\Program Files (x86)\Mono\lib\mono\4.0\mscorlib.dll"
    -r:"C:\Users\XXX\Documents\Projects\monotest\monotest\MonoBrickFirmware.dll"
    "C:\Users\XXX\Documents\Projects\monotest\ftester\AssemblyInfo.fs"
    "C:\Users\XXX\Documents\Projects\monotest\ftester\Program.fs"
    
    ---------------------- Done ----------------------
    
    Build failed. The specified executable is not a valid application for this OS platform.
    Build: 1 error, 0 warnings
    

    The PC is running Windows 7 x64

    #5261
    Author Image
    Anders Søborg
    Keymaster

    Hi there

    I just merged this pull request to the master branch. I will create a new version of the add-in and upload it to my FTP server this weekend. In the meantime I think that what you are experiencing is related to the missing DLL. You have to add the DLL using gacutil. This will be included in the next image release.

    /Anders

    #5268
    Author Image
    mtj_tj
    Participant

    Hey Anders

    Thanks a lot, I’ll wait patiently for the new Add-In 🙂
    I tried adding the DLL using gacutil after giving it a strong name, afterwards I added it to the project by browsing “C:\Windows\Microsoft.NET\assembly\GAC_MSIL\MonoBrickFirmware”, but I had no luck getting it to work.

    Kind regards.

    #5270
    Author Image
    Anders Søborg
    Keymaster

    Hi there

    Try to have a look at this. That guy must know how to do it…

    /Anders

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Posted in

Make a donation