Building Windows App Using Cordova Error


#1

Running:

cordova build windows -- --release --archs="x64"

Gives me the error:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Micro
soft.AppXPackage.Targets(2126,5): error APPX0002: Task 'ValidateAppxManifest' failed. Retrieving the COM class factory
for component with CLSID {5842A140-FF9F-4166-8F5C-62F5B7B0C781} failed due to the following error: 800700c1  is not a v
alid Win32 application. (Exception from HRESULT: 0x800700C1). [C:\_Development\SprocketII\SprocketMobilev2\43\SprocketM
obilev2\platforms\windows\CordovaApp.Windows10.jsproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Micro
soft.AppXPackage.Targets(2126,5): error APPX0002:  [C:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\pla
tforms\windows\CordovaApp.Windows10.jsproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Micro
soft.AppXPackage.Targets(2126,5): error MSB4018: The "ValidateAppxManifest" task failed unexpectedly. [C:\_Development\
SprocketII\SprocketMobilev2\43\SprocketMobilev2\platforms\windows\CordovaApp.Windows10.jsproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Micro
soft.AppXPackage.Targets(2126,5): error MSB4018: System.BadImageFormatException: Retrieving the COM class factory for c
omponent with CLSID {5842A140-FF9F-4166-8F5C-62F5B7B0C781} failed due to the following error: 800700c1  is not a valid
Win32 application. (Exception from HRESULT: 0x800700C1). [C:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobile
v2\platforms\windows\CordovaApp.Windows10.jsproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Micro
soft.AppXPackage.Targets(2126,5): error MSB4018:    at Microsoft.Build.AppxPackage.ValidateAppxManifest.SdkValidation()
 [C:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\platforms\windows\CordovaApp.Windows10.jsproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Micro
soft.AppXPackage.Targets(2126,5): error MSB4018:    at Microsoft.Build.AppxPackage.ValidateAppxManifest.ExecuteImplemen
tation() [C:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\platforms\windows\CordovaApp.Windows10.jsproj
]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Micro
soft.AppXPackage.Targets(2126,5): error MSB4018:    at Microsoft.Build.AppxPackage.AppxPackagingTaskHelper.Execute() [C
:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\platforms\windows\CordovaApp.Windows10.jsproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Micro
soft.AppXPackage.Targets(2126,5): error MSB4018:    at Microsoft.Build.AppxPackage.ValidateAppxManifest.Execute() [C:\_
Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\platforms\windows\CordovaApp.Windows10.jsproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Micro
soft.AppXPackage.Targets(2126,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEn
d.ITaskExecutionHost.Execute() [C:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\platforms\windows\Cordo
vaApp.Windows10.jsproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Micro
soft.AppXPackage.Targets(2126,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__
26.MoveNext() [C:\_Development\SprocketII\SprocketMobilev2\43\SprocketMobilev2\platforms\windows\CordovaApp.Windows10.j
sproj]
(node:6032) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe: Command failed with exit code 1
(node:6032) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

No idea what I’m doing wrong here, but the task ‘ValidateAppxManifest’ keeps failing. Thanks in advance.