2013-10-14 58 views
1

我想用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腳本使用,所以我堅持使用這個。有任何想法嗎?

回答

1

找到它。該錯誤是由於bin文件夾中有一個FSharp.Core.Dll導致的。這是一個混合的F#/ C#項目,如果Dll駐留在GAC中,則不需要本地副本。刪除它使錯誤消失。