2016-02-05 81 views
1

我使用Visual Studio 2013年MVVMCross更新錯誤:不包含「EndingWith」,沒有擴展方法的定義「EndingWith」

我只是在通過的NuGet我的解決方案升級MVVMCross在Windows上通用的應用程序工作而在App.cs,使用下面的方法升級我收到以下錯誤

Error 2 'System.Collections.Generic.IEnumerable<System.Type>' does not contain a definition for 'EndingWith' and no extension method 'EndingWith' accepting a first argument of type 'System.Collections.Generic.IEnumerable<System.Type>' could be found (are you missing a using directive or an assembly reference?) D:\Users\Vicky\OneDrive\Dev\WUA\KpopQuiz.Core\KpopQuiz.Core\App.cs 11 18 KpopQuiz.Core 

後沒有問題的工作

public class App : MvxApplication 
{ 
    public override void Initialize() 
    { 
     CreatableTypes() 
      .EndingWith("Service") 
      .AsInterfaces() 
      .RegisterAsLazySingleton(); 

     RegisterAppStart<ViewModels.StartViewModel>(); 
    } 
} 

不過是對EndingWith貶值或有什麼新的方式來初始化Service類?

回答

5

你只需要添加一個參考using MvvmCross.Platform.IoC;來使用它。

相關問題