我将我的机器和构建机器升级到最新的FSharp 3.1.2。我使用的是FAKE 3.2.17。现在我在构建运行时得到了这个:
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 :(得分:1)
我通过卸载3.1.2并在构建机器上重新安装它来解决这个问题。