开发者

Problems when trying to run FParsec in F# Interactive

开发者 https://www.devze.com 2023-03-29 13:07 出处:网络
I\'m trying to run some FParsec code in F# Int开发者_StackOverflow中文版eractive but with no success. I am

I'm trying to run some FParsec code in F# Int开发者_StackOverflow中文版eractive 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?

Problems when trying to run FParsec in F# Interactive


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). e.g.

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号