title: Running F# code with Mono
body: <p>I have F# 2.0.0 installed, and use mono 2.8.</p>
  
  <pre><code>let rec fib n =
      match n with
      | 1 | 2 -&gt; 1
      | n -&gt; fib(n-1) + fib(n-2)
  
  let n = 40
  let x = fib(n)
  printfn "%d" x
  </code></pre>
  
  <p>I compiled this code with fsc.exe to get fib.exe. Running this with mono fib.exe gives me this error. </p>
  
  <pre>
  mono fact.exe 
  Could not load file or assembly 'FSharp.Core, Version=2.0.0.0, Culture=neutral, 
  PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
  
  Unhandled Exception: System.TypeLoadException: Could not load type 
  '.$Factorial' from assembly 'factorial, Version=0.0.0.0,
   Culture=neutral, PublicKeyToken=null'.
  </pre>
  
  <p>What might be wrong?</p>
  
  <h2>ADDED</h2>
  
  <pre>
  sudo gacutil -i FSharp.Core.dll 
  </pre> 
  
  <p>solved this problem.</p>