2016-11-05 11 views
1

モバイルエミュレータ10586上の簡単なPrism.Mvvmアプリを展開するとき、それはシミュレータ上だけでなく、私のローカルマシン上で動作しながら、私は、例外が発生しました。私はPrism.storeapps package.Hereに参照しています は私のコードプリズムMVVMアプリの展開エラー

App.xaml.cs

namespace MvvmSample 
{ 
    sealed partial class App : MvvmAppBase 
    { 
     public App() 
     { 
      InitializeComponent(); 
     } 
     public enum Expirences 
     { 
      Main 
     } 
     protected override Task OnLaunchApplicationAsync(LaunchActivatedEventArgs args) 
     { 
      this.NavigationService.Navigate(Expirences.Main.ToString(), null); 
      return Task.FromResult<object>(null); 
     } 

    } 
} 

MainPage.xamlを

<controls:PageBase 
    x:Class="MvvmSample.Views.MainPage" 
    xmlns:controls="using:MvvmSample.Controls" 
    xmlns:prism="using:Microsoft.Practices.Prism.Mvvm" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:local="using:MvvmSample" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    prism:ViewModelLocator.AutoWireViewModel="True" 
    mc:Ignorable="d"> 
    <d:Page.DataContext> 
     <local:MainPageViewModel/> 
    </d:Page.DataContext> 
    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> 
     <TextBlock Text="{Binding Title}" FontSize="29.333" /> 
    </Grid> 
</controls:PageBase> 

ビュー

namespace MvvmSample 
{ 
    namespace Controls 
    { 
     public abstract partial class PageBase : Page, IView { } 
    } 
    namespace Views 
    { 
     public sealed partial class MainPage : Controls.PageBase 
     { 
      public MainPage() 
      { 
       this.InitializeComponent(); 
      } 
     } 
    } 
    namespace ViewModels 
    { 
     public class MainPageViewModel : Microsoft.Practices.Prism.Mvvm.ViewModel 
     { 
      public string Title { get; set; } 
      public MainPageViewModel() 
      { 
       this.Title = "Run Time"; 
      } 
     } 
    } 
} 
+0

展開エラーとは何ですか? –

答えて

1

あなたがありますWindows 8.1のパッケージであるPrism.StoreAppsを使用してください。 UWPの場合は、Prism.Windowsを使用してください。あなたのマシンで動作しているのは、Windows 10がWindows 8のアプリケーションを実行できるからです。エミュレータは特定のSDKビルドですが、 (依存性注入を含む)は、Windows 10で使用可能なNuGetパッケージの詳細情報については

official GitHub repoを確認してください。 this repoにもいくつかのサンプルがあります。