Copy the first demo program from Expert F# to VS2008. There has a compiler error with split function when I compiler the program. I found a solution from internet likes below:

 Interactive (Console)下管用)。在.net里在工程文件的引用里添加FSharp.PowerPack.dll
-----创建一个工程项目的时候,带了一个引用文件夹,这里面可以添加你项目要用的库------
右键单击“References”选择“Add References”,进去后选择“.NET”下的“FSharp.PowerPack”,然后确定就OK了。

Thanks the guy shared this on his blog.

Another way to run the demo program is on command line.
1. Open a command line window
2. Go to the FSharp installed path
3. Type the fsi.exe (it is the F# interactive environment)
4. Type #help;; command, it will show the help of F# interactive environment.
5. Copy the demo program and paste it to command line window, notice: should type the ;; at the end.
If you press the enter key, you will get a compiler error about the split function. Now, we know the DLL file missed. We can use the
#r "FSharp.PowerPack.dll";;
command to  set reference dll file.
6. Paste the program again, then you will get the
val wordCount : string -> int * int
val showWordCount : string -> unit
If you get the message, it means your first F# program works well now.

相关文章:

  • 2022-12-23
  • 2021-08-20
  • 2021-09-30
  • 2021-04-16
  • 2022-02-02
  • 2021-10-23
  • 2021-09-12
  • 2021-07-13
猜你喜欢
  • 2021-06-26
  • 2021-09-07
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
相关资源
相似解决方案