问题
I've had F# Powerpack for a while now. It ran perfectly. But a few days before, I don't know what I did, whenever I compile my project and run it, I get an error
Method not found: 'System.Object Microsoft.FSharp.Text.Parsing.Tables`1.Interpret(Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Text.Lexing.LexBuffer`1<Char>,!0>, Microsoft.FSharp.Text.Lexing.LexBuffer`1<Char>, Int32)'.
I tried on my laptop too. Then I thought, that it might be an error in my code. So I started a new project, F# Parsed Language Starter Kit (the starter kit you find online), and it fails with the same error. I tried reinstalling F# Powerpack but the error continues.
回答1:
You've probably installed VS2010 SP1. http://fsharpnews.blogspot.com/2011/03/dont-install-vs2010-sp1.html
回答2:
Please send details of your install configuration and updates to fsbugs AT microsoft.com.
Also, please repair Visual Studio, and/or look at the instructions on this page and send us the contents of your pub.config
file.
A workaround to get you going again is to recompile the F# Power Pack for .NET 4.0 (it is a .NET 2.0 binary, and this related to the issue you're seeing)
回答3:
I've got the same error when trying to build WikiBooks Lexing/Parsing example in Visual Studio 2012. I resolved the problem by switching target framework from 4.0 to 4.5 in project settings.
来源:https://stackoverflow.com/questions/5447539/problem-with-f-powerpack-method-not-found-error