2011-02-08 13 views
4
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. 
    at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) 
    at System.Reflection.Assembly.GetTypes() 
    at Microsoft.Tools.SvcHost.ServiceHostHelper.LoadServiceAssembly(String svcAssemblyPath) 

如何通過LoaderExceptions屬性循環查看發生了什麼錯誤,因爲它沒有碰到任何服務並在運行任何代碼之前給我這個錯誤?WcfSVCHost遇到嚴重錯誤,必須退出。這可能是由無效的配置文件造成的

謝謝

+0

嘗試檢查`.InnerException`屬性遞歸。 – 2011-02-08 09:37:37

回答

9

我設法解決這個問題。我的一個項目設置爲x86,其他設置爲Any CPU。全部更改爲任何CPU解決了我的問題。

謝謝

相關問題