2014-09-25 28 views
2

我将我的机器和我的机器都升级到最新的FSharp 3.1.2。我正在使用FAKE 3.2.17。现在,我得到这个当构建运行:升级到FSharp 3.1.2 ...现在查询不起作用?

System.TypeInitializationException: The type initializer for '<StartupCode$FSharp-Core>.$Query' threw an exception. ---> System.ArgumentException: The handle is invalid. 

at System.Reflection.MethodBase.GetMethodFromHandle(RuntimeMethodHandle handle) 
    at Microsoft.FSharp.Linq.QueryModule.CallGenericStaticMethod(RuntimeMethodHandle methHandle) 
    at Microsoft.FSharp.Linq.QueryModule.MakersCallers2(RuntimeMethodHandle FQ, RuntimeMethodHandle FE) 
    at Microsoft.FSharp.Linq.QueryModule.MakeOrCallAverageByOrSumByGeneric[a,b,c,d,e,f,g,h,i](Boolean isNullable, RuntimeMethodHandle fq_double, RuntimeMethodHandle fq_single, RuntimeMethodHandle fq_decimal, RuntimeMethodHandle fq_int32, RuntimeMethodHandle fq_int64, RuntimeMethodHandle fe_double, RuntimeMethodHandle fe_single, RuntimeMethodHandle fe_decimal, RuntimeMethodHandle fe_int32, RuntimeMethodHandle fe_int64, RuntimeMethodHandle FE) 
    at <StartupCode$FSharp-Core>.$Query..cctor() 
    --- End of inner exception stack trace --- 
    at Microsoft.FSharp.Linq.ForwardDeclarations.get_Query() 
    at Microsoft.FSharp.Linq.QueryBuilder.Run[T](FSharpExpr`1 q) 

这里是它的代码炸弹:

 let records = 
      query { 
       for row in table do 
        where (row.Val.Contains(fileName)) 
        select row 
      } 

任何想法?谢谢。

+0

是来自另一个程序集的文件名,偶然允许空字符串?我猜想这是关于文件名可能是空的 – theDarse 2014-09-25 12:55:23

+0

伟大的想法。它不是来自另一个程序集,我确认fileName有一个值。谢谢! – 2014-09-25 13:17:53

回答

1

我解决了这个问题,通过卸载3.1.2并重新安装到生成机器上。