Search code examples
winformsvisual-studio-2010f#visual-studio-2005compatibility

How to compile an old version of F# using Microsoft Visual Studio 2010?


I am trying to learn F#, and I was looking into a Suduko Solver program [Link is here] (http://www.ffconsultancy.com/dotnet/fsharp/sudoku/code/1/sudoku.fs)! The original program was developed in Visual Studio 2005;but when I tried to build it again using Microsoft Visual Studio 2010, I got some errors. I manually added references to System.Drawing and System.Windows.Forms, but VS2010 still does not seem to recognize Idoms. Any ideas how I can get this program to compile under VS2010?


Solution

  • So Fixing the error messages

    The following replacements need to be made

    n -> string_of_int n : n->n.ToString()
    Byte.of_int 0        : 0uy
    IEnumurable          : Seq
    m.(y).(i)            : m.[y].[i] //this appears with similar syntax a few times - just need to change round to square brackets
    

    not sure why you are getting init_control is not defined it might be okay once the other stuff is fixed.