我正在尝试用xsp4测试一个网站,所有的程序集都是为目标框架4.5编译的。我得到了下面的堆栈跟踪。TraceManager初始化过程中出现异常:
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&)在stackoverflow (和其他地方)上搜索一下,发现一个可能的原因是xsp4运行在mono的4.0目录中。我的脚本已经在4.5中找到了,并且被xsp脚本使用,所以我坚持使用这个脚本。有什么想法吗?
发布于 2013-10-15 15:00:23
找到了。此错误是由于bin文件夹中有一个FSharp.Core.Dll而导致的。它是一个混合的F# / C#项目,如果Dll驻留在GAC中,则不需要本地副本。删除它会使错误消失。
https://stackoverflow.com/questions/19356246
复制相似问题