我無法在發佈模式下運行我的UWP應用程序,因爲當我試圖訪問CurrentApp.LicenseInformation時,它總是立即崩潰。UWP應用程序發佈模式CurrentApp錯誤
重現步驟: 創建一個新的空白UWP應用程序。轉到MainPage.xaml.cs並添加以下內容:
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
Loaded += MainPage_Loaded;
}
private void MainPage_Loaded(object sender, RoutedEventArgs e)
{
ProductIapTextBlock.Text = CurrentApp.LicenseInformation.ProductLicenses[ "hello" ].IsActive.ToString();
}
}
現在更改爲發佈模式和x86平臺並嘗試運行該應用程序。它應該與上面的圖像中的錯誤一起崩潰。
這裏有什麼問題?問題隱藏在我的代碼中,還是UWP中存在問題?
看看這個:http://stackoverflow.com/questions/34364580/wp8-1-and-wp10-differences – Gusman
看到了,但它並沒有幫助。這是一個非常簡單和基本的場景,不是一個Windows Phone 8.1應用程序。這就是爲什麼它更大的問題。 –
但是您是否檢查過您的Window Store帳戶以查看是否全部填入了? – Gusman