Search Unity

Failure to deploy on Surface tablet

Discussion in 'Windows' started by asbrian, Apr 5, 2018.

  1. asbrian

    asbrian

    Joined:
    Mar 15, 2018
    Posts:
    6
    Using Unity 2017.3.1f1, I created a very basic AR app. All it contains is an ARCamera, an ImageTarget, and a simple 3D model which is a child of the ImageTarget. It works fine on my Windows 10 desktop computer with external webcam in the Unity editor, and as a standalone EXE (with the known issue of black camera space). So next I generated it for UWP to deploy on my Surface tablet.

    It generated, then I created an App Package (x64 Release) in Visual Studio 2017. I copied it over to my Microsoft Surface (Windows 10). I attempted to install with a PowerShell run of Add-AppDevPackage.ps1. It successfully secured a developer license and started unpacking and installing, then terminated with:

    "error 0x80070490: Cannot process the Microsoft.Office.Sway_17.6216.20251.0_x64_8wekyb3d8bbwe package because the following error was encountered while retrieving the 4 property for the value 'images\SwayAppList.png': Element not found."

    Sway is an Office product. I don't understand why my simple app would have any need for it. My Dependencies folder only has two files in it: Microsoft.NET.CoreRuntime.1.1.appx and Microsoft.VCLibs.x64.10.00.appx.

    Any guidance would be much appreciated. Thank you!
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    Can you paste the full powershell output you get from executing that script? You should also be able to double click on your .appx package to install it.
     
  3. asbrian

    asbrian

    Joined:
    Mar 15, 2018
    Posts:
    6
    Here's the PowerShell output:

    Found bundle: C:\Users\asbrian\Desktop\Simple_AR_1.0.3.0_Test\Simple_AR_1.0.3.0_x64.appxbundle
    Installing app...
    Found dependency package(s):
    C:\Users\asbrian\Desktop\Simple_AR_1.0.3.0_Test\Dependencies\x86\Microsoft.NET.CoreRuntime.1.1.appx
    C:\Users\asbrian\Desktop\Simple_AR_1.0.3.0_Test\Dependencies\x86\Microsoft.VCLibs.x86.14.00.appx
    C:\Users\asbrian\Desktop\Simple_AR_1.0.3.0_Test\Dependencies\x64\Microsoft.NET.CoreRuntime.1.1.appx
    C:\Users\asbrian\Desktop\Simple_AR_1.0.3.0_Test\Dependencies\x64\Microsoft.VCLibs.x64.14.00.appx
    Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF6, Package could not be registered.
    error 0x80070490: Cannot process the Microsoft.Office.Sway_17.6216.20251.0_x64__8wekyb3d8bbwe package because the following error was encountered while retrieving the 4 property for the value 'images\SwayAppList.png': Element not found.

    NOTE: For additional information, look for [ActivityId] 5e7669d1-36c0-0001-e724-795ec036d101 in the Event Log or use
    the command line Get-AppxLog -ActivityID 5e7669d1-36c0-0001-e724-795ec036d101
    At C:\Users\asbrian\Desktop\Simple_AR_1.0.3.0_Test\Add-AppDevPackage.ps1:388 char:13
    + Add-AppxPackage -Path $DeveloperPackagePath.FullName -Dep ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : WriteError: (C:\Users\asbrian..._x64.appxbundle:String) [Add-AppxPackage], IOException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand
    Error: Could not install the app.
     
    Last edited: Apr 6, 2018
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    Did double clicking on the .appx package not work?
     
  5. asbrian

    asbrian

    Joined:
    Mar 15, 2018
    Posts:
    6
    When I did that, it went app-searching for something to open it. Am I missing a necessary component on the tablet?
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    What version of the OS is the tablet running? This capability was added in Windows 10 Anniversary Update, which was released quite a long time ago.

    Could you try executing Add-AppxPackage on the powershell command line manually with your app package? Googling that particular error turned up many hits on google, but no definitely solution, unfortunately.
     
  7. asbrian

    asbrian

    Joined:
    Mar 15, 2018
    Posts:
    6
    The tablet is running Windows 10 Home, version 1511.
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    Yeah, that is a very old OS version.

    Anyway, I'd suggest making an empty app from Visual Studio, creating appx package from that and seeing if it behaves the same way as the package created from Unity App. Chances are there's something wrong with the OS installation.
     
    asbrian likes this.
  9. asbrian

    asbrian

    Joined:
    Mar 15, 2018
    Posts:
    6
    I got it! Your suggestion about the age of the target OS set me down the right path. In looking how to change the UWP version for an existing project, I ultimately discovered the problem was that Xamarin.Forms was not added to the project, which I did in VS 2017 and it works now. Is that a necessary manual step, or is there a setting that I missed in Unity that should do that?

    Thank you for your help! :)


    Edit to add: Still not quite there, but it's progress. It seems now that it works in Debug, but I get the original deployment error in Release.
     
    Last edited: Apr 9, 2018
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    Does your app actually use Xamarin.Forms? You shouldn't need to add that to a vanilla Unity project.
     
  11. asbrian

    asbrian

    Joined:
    Mar 15, 2018
    Posts:
    6
    That may have been a red herring. It's all working now. I think the real step forward was generating a Debug version, which I happened to do at the same time as adding Xamarin.Forms. It would still fail for Release, though. I finally checked the Windows Store and saw that Sway was due for update, but was stuck in a Pending status. A few googles later, I cleared the store cache, restarted the update service, and Sway updated. The Release version of my app works fine now. It must have been some incompatibility between my Microsoft.VCLibs.x64.14.00 dependency and the version of Sway that was installed but never updating. Thanks again!