MVVMCross更新错误:不包含'EndingWith'的定义,也没有扩展方法'EndingWith'

时间:2016-02-05 03:16:51

标签: c# cross-platform mvvmcross

我正在使用Visual Studio 2013开发Windows Universal App。

我刚刚在我的解决方案中通过nuget和App.cs升级了MVVMCross,以下方法用于工作而没有问题

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

        RegisterAppStart<ViewModels.StartViewModel>();
    }
}

但升级后我收到以下错误

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

EndingWith是否已弃用或是否有新的初始化Service类的方式?

1 个答案:

答案 0 :(得分:5)

您只需添加using MvvmCross.Platform.IoC;的引用即可使用它。