2011-03-14 44 views
0

我試過用這種方法在很多方面googling,不知何故,這是第一個一般看似的錯誤消息,我一直未能找到任何結果。類型DefaultConventionScanner必須可轉換爲ITypeScanner,StructureMap

無論如何,我正在將我的StructureMap升級到最新版本(我不確定我安裝的最後一個版本是什麼,我很害怕),並且不斷收到錯誤:​​。

是造成該問題的代碼是:

Scan(scanner => 
      { 
       scanner.Assembly(typeof(PersonService).Assembly); 
       scanner.AddAllTypesOf(typeof(IEntityService<>)); 
       scanner.AddAllTypesOf(typeof(IRootEntityService<>)); 
       scanner.With<DefaultConventionScanner>(); // This line 
      }); 

任何人有任何想法/經驗,用這個問題呢?

+2

你試過scanner.WithDefaultConventions()嗎? – 2011-03-14 22:11:57

+0

我做了後,我做了沒有迴應的帖子:)我打算在幾天內將它設置爲答案,但既然你得到它,你可以得到的積分:D – Harold 2011-03-15 06:21:57

回答

3

現在搞清楚了,應該換成scanner.WithDefaultConventions();

+0

謝謝......它幫助我。 – Snesh 2014-01-17 13:51:26

相關問題