Pet*_*ner 3 f# parsing exception fparsec visual-studio-2013
如何在VS2013专业版中运行FParsec?
我尝试使用以下nuget包:
我试图自己编译https://bitbucket.org/fparsec/main的源代码并使用生成的dll:FParsec.dll和FParsecCS.dll.
但无论哪种方式,我总是得到运行教程代码的以下异常:
System.MissingMethodException
Method not found:
Microsoft.FSharp.Core.FSharpFunc`2<FParsec.CharStream`1<!!0>,FParsec.Reply`1<Double>> FParsec.CharParsers.pfloat()"
Run Code Online (Sandbox Code Playgroud)
任何人都可以提供逐步解决方案,让谁在VS2013上运行FParsec?
这是我尝试运行的代码:
open FParsec
[<EntryPoint>]
let main args =
let str s = pstring s // This line works
let floatBetweenBrackets = str "[" >>. pfloat .>> str "]" // This line breaks
Console.ReadKey() |> ignore
0
Run Code Online (Sandbox Code Playgroud)
尝试使用以下内容将App.config添加到项目中:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.1.0" newVersion="4.3.1.0" />
</dependentAssembly>
</runtime>
</configuration>
Run Code Online (Sandbox Code Playgroud)
检查您的FSharp.Core版本,并在必要时修补此代码段.
| 归档时间: |
|
| 查看次数: |
265 次 |
| 最近记录: |