2016-02-05 83 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;来使用它。

相关问题