0

I am trying to build cordova / ionic project and successful create appx file, however I need to create appxupload file, how can I archive this without building project ins VisualStudio.

This is my working code to build appx file, but it does not build appxupload:

set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional
set MSBUILDDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin
set MakePriExeFullPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x86\MakePri.exe

npm run ionic -- cordova build windows --debug -- --arch=x86 --buildConfig cicd/Builds/uwp/files/build.json

My build configuration file ( cicd\Builds\uwp\files\build.json ) is:

  {
    "windows": {
      "debug": {
        "buildFlag": [
            "/p:Configuration=Debug",
            "/clp:Verbosity=normal",
            "/p:UapAppxPackageBuildMode=StoreUpload",
            "/p:Platform=x86"
        ]
      },
      "release": {
        "buildFlag": [
            "/p:Configuration=Debug",
            "/clp:Verbosity=normal",
            "/p:UapAppxPackageBuildMode=StoreUpload",
            "/p:Platform=x86"
        ]
      }
    }
  }
Alexey Melezhik
  • 962
  • 9
  • 27

1 Answers1

0

Have googled for awhile, still have no idea how to do so through ionic/cordova cli, but keeping in mind that appxupload is just a ZIP containing appx and appxsym files I ended up with straightforward powershell solution :

Compress-Archive -Path *.appx, *.appxsym -DestinationPath CordovaApp.Windows.zip -Force 
Rename-Item -Path CordovaApp.Windows.zip -NewName CordovaApp.Windows.appxupload
Alexey Melezhik
  • 962
  • 9
  • 27