[Resolved] D3D application type doesn't handle prelaunch, fails WACK

My game fails to complete all Windows Application Certification Kit tests because it doesn’t handle prelaunch at all. (the application should have a void OnLaunched(LaunchActivatedEventArgs args) function)

I have searched the internet and found out that if you use XAML build type, you get App.xaml.cs file that has that function by default, whereas for the D3D build there’s no such function present. Moreover, the main App class doesn’t even inherit from the Application class.

I also do not see a simple way to implement that function. From what I’ve gathered, XAML stuff and the game code run in different threads, and it feels like the App.cs code is related to the second one.

Here are my questions:

  • Can I keep the D3D build type and somehow implement the OnLaunched function?
  • I think I can simply exclude the prelaunch test from WACK. Is it correct, and shall I be able to release the game given that the game will pass all other tests?
  • There’s an easy way out - simply to rebuild the game using XAML, but I’ve read that it is worse in terms of performance, and we don’t use any XAML stuff in the game. How bad is the performance difference?

How did you come to that conclusion? You definitely don’t need that function to pass WACK.

@Tautvydas-Zilys well, it’s simple, really.
I built the project in Unity, then opened it in Visual Studio. Then I selected the “Create Packages…” option. After it had finished, I got a WACK window where all the tests were selected by default. I was like “okay whatever” and let it do its thing.

When it was done, I got a window that said that my application failed WACK, and on the results webpage only the prelaunch test had “failed” in front of it.

Could you paste the failed WACK log?

I’m running the whole build process again right now, and I’ll have the log in about half an hour.

@Tautvydas-Zilys alright, it’s done, and the result is the same.

WACK creates a lot of log files, so here’s an archive with all the relevant ones

2490548–171828–wack_logs.zip (11.9 KB)

I’m pretty sure the requirement to handle prelaunch in with LaunchActivatedEventArgs applies to XAML applications only. On the other hand, I could not reproduce WACK failure locally (just tried it). Could you try running WACK on your machine on an empty project? I wonder if it’s something in your project it doesn’t like, something with what Unity is doing or something with your setup.

Alright, I’ll try that right now.

I have successfully reproduced the bug with an empty project. I used “.Net Core” compliation override and .Net scripting backend.

During the package creation process I used my windows store application as the target, so the info in Package.appxmanifest (package name, publisher, etc) correspond to the ones in the app dashboard.

What version of Windows are you running on? Are you by any chance on an insider build?

Microsoft Windows 10 Pro Insider Preview (10.0.11082.0)

You think this could be a problem?

Yup, looks like it’s a known issue. See this:

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/548f8344-965f-4029-96d8-e356da26a28f/uwphtml-wack-app-prelaunch-test-fail?forum=wpdevelop

This should also not prevent you from submitting your game.

1 Like

Alright, huge thanks for helping to clear this out!