Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Namespace or module "Runtime" not defined

Tags:

f#

funscript

So the "Funscript" page here has a sample. Now I have loaded the sample into my Visual Studio 2012. I am not familiar with Visual Studio .NET and am only learning F# very recently. The last line in the sample pages which is:

do Runtime.Run(components=components, directory="Web") 

always throws an error. In fact the Visual Studio IDE(Compiler) cannot seem to recognize Runtime.

If this was a language like Java, one would try to import a library and so I tried using System.Runtime, but still the Visual Studio IDE does not recognize and the line throws an error saying :

"The namespace or module "Runtime" is not defined.

Two questions

  1. How can I get around this?
  2. Is there any link that teaches F# for the complete beginner that also involves loading external libraries?
like image 243
N00bsie Avatar asked Jul 04 '13 23:07

N00bsie


1 Answers

I figured this out. Funscript requires a launcher, which is talked about in the documentation. It is contained in Examples/Shared/Launcher.fs. If you use the .fsproj files that come with funscript, this is all handled automatically.

If you are compiling by hand, just add ../Shared/Launcher.fs before you compile your own file.

like image 79
John Palmer Avatar answered Sep 24 '22 03:09

John Palmer