简体   繁体   中英

Problems when trying to run FParsec in F# Interactive

I'm trying to run some FParsec code in F# Interactive but with no success. I am able to build and run this tutorial.fs file, but the same isn't happening with FSI, as it didn't recognize FParsec.dll .

I've already tried running the #r "Parsec" command in FSI but it was of no avail.

Anyone has a clue on what might be the problem here?

在此输入图像描述

FParsec is not GAC installed, therefore you need to put the full path to the dll in the #r directive, not just the name of the assembly. Also, don't forget that "...FParsec is built as two DLLs. The C# bits are compiled into the FParsecCS.dll and the F# bits (which depend on the C# bits) are compiled into FParsec.dll." ( section 3.2 of the documentation). eg

#r @"C:\FParsecCS.dll"
#r @"C:\FParsec.dll"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM