2012-08-30 27 views
0

我的工作.NET項目,錯誤創建上下文「spring.root」:

,因爲從最後2天收到以下錯誤,是指其他裝配Valhalla.Core但不準確獲得無法從字符串值加載類型錯誤原因。

最近沒做任何更改幫助我找出原因。

{"Error creating context 'spring.root': Could not load type from string value 'Valhalla.Core.Events.Implementation.EventListenerManager, Valhalla.Core.Events.Implementation'."} 

{"Could not load type from string value 'Valhalla.Core.Events.Implementation.EventListenerManager, Valhalla.Core.Events.Implementation'.":""} 

回答

3

你提到的組件名稱爲Valhalla.Core,但在錯誤信息的類型修飾符表示裝配命名Valhalla.Core.Events.Implementations。逗號後的部分是程序集名稱。

搜索XML配置文件

type="Valhalla.Core.Events.Implementation.EventListenerManager, Valhalla.Core.Events.Implementations" 

而且隨着

type="Valhalla.Core.Events.Implementation.EventListenerManager, Valhalla.Core" 

更換一些其他的東西,你可以調查:

  • 哪個組件包括EventListenerManager
  • 該組件是否出現在輸出目錄中?
  • 在什麼命名空間是EventListenerManager
+0

嗨,感謝您的回覆'Valhalla.Core.Events.Implementation' DLL也與我,但我沒有提及它,需要引用這個或也沒有? – Neo

+0

指代程序集也沒有運氣會嘗試你的解決方案在哪個xml配置?這是控制檯應用程序簽入app.config沒有找到任何條目 – Neo

+0

您不需要在您的Visual Studio項目中引用程序集。我會在我的答案中提供更多的指針。 – Marijn