MissingMethodException与xsp4和asp.net 4.5

问题描述:

我想用xsp4测试一个网站,所有的程序集都是为目标框架4.5编译的。我得到以下堆栈跟踪。 TraceManager初始化期间 例外:MissingMethodException与xsp4和asp.net 4.5

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Web.Configuration.TraceSection ---> System.MissingMethodException: Method not found: 'System.Configuration.ConfigurationProperty..ctor'. 
    --- End of inner exception stack trace --- 
    at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) 

的计算器(和其他地方)这里的一个搜索发现,一个可能的原因是xsp4 4.0目录单的中运行。 Mine已经位于4.5中,并被xsp脚本使用,所以我坚持使用这个。有任何想法吗?

找到它。该错误是由于bin文件夹中有一个FSharp.Core.Dll导致的。这是一个混合的F#/ C#项目,如果Dll驻留在GAC中,则不需要本地副本。删除它使错误消失。