2
votes

I am trying to build appx installer file for an application we built using Visual Studio and Apache Cordova Tools. The build is successful and I get the appx file alongside the certificate and other powershell scripts. But when I install the appx on a mobile device the app does not even launch. Upin inspection I noticed that there is no longer a dependencies folder.

I have older installer files generated on another build machine. These installer files include a folder called "Dependencies" as well as other files. the dependencies folder has arch folders with three .NET dependecies as .appx files.

I tried to include the package dependencies as below in the appxmanifest file within package.appxmanifest file, but the dependencies are still not getting picked up. When VS 2017 generates the windows10.appxmanifest file it shows my changes for Identity, but not for dependencies. Not sure what I am missing.

I am using the following software.

VS2017 15.6.7 Cordova: 6.3.1 node.js: 4.4.3 npm: 2.15

cordova-windows-platform: 4.4.2

My Package.appxmanifest file dependencies xml block

  <Dependencies>
    <TargetDeviceFamily MaxVersionTested="10.0.17134.0" MinVersion="10.0.10240.0" Name="Windows.Universal" />
    <PackageDependency Name="Microsoft.VCLibs.140.00" MinVersion="14.0.25426.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
    <PackageDependency Name="Microsoft.NET.Native.Framework.1.3" MinVersion="1.3.24201.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
    <PackageDependency Name="Microsoft.NET.Native.Runtime.1.4" MinVersion="1.4.24201.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
  </Dependencies>

How can I get the dependencies folder created for this application during the appx generation using the "Create App Packages" menu on VS 2017

I have removed and re-added the platform with no luck...

Right clicking on Dependencies gives below options.

dependencies

1
What's wrong with the Build > Build Solution menu option? Can you deploy that appx or emulate it correctly?andreszs
Hi. The build is successful and I get appx generated. But, after installing the app it does not launch. Just flashes the launch screen and dies.Mo Ziauddin
My question is how can I get the dependencies flowing through to build. I crated different appxmanifest files in res/native/windows to get them to appxmanifest file that is generated. But no luck. I don't know if I need to get dependencies as bower or neget packages. Any assistance will be much appreciatedMo Ziauddin
@andreszs: Any ideas please...Mo Ziauddin

1 Answers

0
votes

In the Solution Explorer pane, do you see the Dependencies (or References) item with an exclamation sign? In this case, right click on it and select Restore Packages to have them installed...

Visual Studio Solution Explorer

Also, what Gradle version do you have? I recommend using 4.x at most with Visual Studio, check out this guide to change gradle version in Windows.