We implemented a build pipeline for our UWP app on VSTS. We can build the application on any of our developer workstations in release mode with .NET native enabled and the app works as expected.
When we build the same application on a Hosted VS2017 Agent in VSTS, the application also builds successful and the resulting appxbundle file can be installed on a device. However, the application crashes right after showing the splash screen.
I can't see any difference in the way we build the application in VS2017 compared to the way it is build on the Hosted VS2017 Agent in VSTS.
The event log shows the following right after the crash:
Faulting application name: Foo.exe, version: 0.19.1.0, time stamp: 0x5a1d8e4a Faulting module name: Windows.UI.Xaml.dll, version: 10.0.16299.15, time stamp: 0xf6706fe0 Exception code: 0xc000027b Fault offset: 0x00000000006e7269 Faulting process ID: 0x3044 Faulting application start time: 0x01d368691c216952 Faulting application path: C:\Program Files\WindowsApps\Foo_0.19.1.0_x64__fdr8vq4bd9b2a\Foo.exe Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll Report ID: 2655f631-947c-42e5-b3d4-2d2679a93332 Faulting package full name: Foo_0.19.1.0_x64__fdr8vq4bd9b2a Faulting package-relative application ID: App
The build step in VSTS is configured as following:
/p:AppxBundlePlatforms="$(BuildPlatform)" /p:AppxPackageDir="$(Build.ArtifactStagingDirectory)\AppxPackages\\" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload
If I use the same command line and run it on any developer workstation it works and the resulting appxbundle can be installed and started without any crash.
Any idea what the difference could be or how I can debug the app best?