当我在基于模板10的应用程序上运行app认证时,我会得到以下错误:
错误发现:应用程序启动前验证检测到以下错误:应用程序启动前测试失败的49581RisingSoundMedia.ElectionCentral_1.1.7.0_x64__xrbjpqg44kdgm.
·影响(如果不是固定的话):即使启用了启动前,该应用程序的启动时间也会更长。
·如何修复:在应用程序的OnLaunched方法实现中,确保您处理LaunchActivatedEventArgs.PreLaunch选项以使预启动事件知道。
显然,即使使用模板10,我也不能覆盖OnLaunched,因为Bootstrap类会封住它。
我试图重写OnPreLaunchAsync并设置continueStartup = false;但是它没有解决问题。
有什么想法吗?
发布于 2016-03-18 21:57:43
事实证明,我能够发布到商店,它通过了认证,即使它失败了本地Windows套件本地。
发布于 2016-08-25 21:39:14
这似乎是Windows的一个已知问题:https://developer.microsoft.com/en-us/windows/develop/app-certification-kit
“应用程序预启动验证测试将失败,您可以在1607版之前发布的Windows-10版本上运行。请注意,此测试不是作为Windows提交最终认证的一部分运行的。”
解决方案:为了确保测试结果通过,使用Windows-10SDK版本(14393)运行在Windows-10周年版上进行测试。
发布于 2016-02-23 21:42:03
是的,我有这个问题,首先,您是否更新为最新版本的模板10 (1.1.4):https://www.nuget.org/packages/template10
接下来,我要做的是将OnInitializeAsync中的所有代码和app.xaml.cs中的OnStartAsync移到App()中。
您需要尽可能地保持OnInitializeAsync和OnStartAsync的精益,您应该只在它们中保留必要的Template10代码,并在App()中添加特定的代码。
public override Task OnInitializeAsync(IActivatedEventArgs args)
{
// content may already be shell when resuming
if ((Window.Current.Content as ModalDialog) == null)
{
// setup hamburger shell
var nav = NavigationServiceFactory(BackButton.Attach, ExistingContent.Include);
Window.Current.Content = new ModalDialog
{
DisableBackButtonWhenModal = true,
Content = new Shell(nav),
ModalContent = new Views.Busy(),
};
}
return Task.CompletedTask;
}
public override async Task OnStartAsync(StartKind startKind, IActivatedEventArgs args)
{
NavigationService.Navigate(typeof(MainView));
return Task.CompletedTask;
}在App()中,我为我的应用程序添加了我的所有初始化方法,所以我的App()看起来像这样:
public App()
{
Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync(
WindowsCollectors.Metadata |
WindowsCollectors.UnhandledException |
WindowsCollectors.PageView |
WindowsCollectors.Session
);
this.InitializeComponent();
var element = new ViewModelLocator();
//Template10.Services.LoggingService.LoggingService.Enabled = true;
//Template 10 stuff
// DOCS: https://github.com/Windows-XAML/Template10/wiki/Docs-%7C-Cache
CacheMaxDuration = TimeSpan.FromDays(1);
// DOCS: https://github.com/Windows-XAML/Template10/wiki/Docs-%7C-BackButton
ShowShellBackButton = SettingsService.Instance.UseShellBackButton;
// DOCS: https://github.com/Windows-XAML/Template10/wiki/Docs-%7C-SplashScreen
SplashFactory = (e) => new Views.Splash(e);
//My code here
ApiRoot.Instance.Init();
InitDeviceTypeAndResource();
InitApiLanguage();
InitAppLanguage();
InitABCRatings();
//For updating Tiles
RegisterBackgroundTask();
}我希望这能帮到你!
https://stackoverflow.com/questions/35569023
复制相似问题