Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# MVVMCross更新错误:不包含';以'结尾;没有扩展方法';以'结尾;_C#_Cross Platform_Mvvmcross - Fatal编程技术网

C# MVVMCross更新错误:不包含';以'结尾;没有扩展方法';以'结尾;

C# MVVMCross更新错误:不包含';以'结尾;没有扩展方法';以'结尾;,c#,cross-platform,mvvmcross,C#,Cross Platform,Mvvmcross,我正在使用Visual Studio 2013开发Windows通用应用程序 我刚刚通过nuget和App.cs在我的解决方案中升级了MVVMCross,使用以下方法可以毫无问题地工作 public class App : MvxApplication { public override void Initialize() { CreatableTypes() .EndingWith("Service") .As

我正在使用Visual Studio 2013开发Windows通用应用程序

我刚刚通过nuget和App.cs在我的解决方案中升级了MVVMCross,使用以下方法可以毫无问题地工作

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

        RegisterAppStart<ViewModels.StartViewModel>();
    }
}
公共类应用程序:MVX应用程序
{
公共覆盖无效初始化()
{
createabletypes()
.以“服务”结尾
.a接口()
.registeraslazyingleton();
RegisterAppStart();
}
}
但是在升级之后,我得到了以下错误

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
错误2“System.Collections.Generic.IEnumerable”不包含“EndingWith”的定义,并且找不到扩展方法“EndingWith”接受类型为“System.Collections.Generic.IEnumerable”的第一个参数(是否缺少using指令或程序集引用?)D:\Users\Vicky\OneDrive\Dev\WUA\kpopquick.Core\kpopquick.Core\App.cs 11 18 kpopquick.Core

是否以
结尾,或者是否有新的方法初始化
服务
类?

您只需使用MvvmCross.Platform.IoC添加一个
引用即可
来使用它。

您只需使用MvvmCross.Platform.IoC添加一个带有
的引用以使用它