How to sign Windows 10 (UWP) App?

4

The process should be the same, like for Windows 8.1(Universal) Apps. (Link)

I used this command:

powershell.exe -ExecutionPolicy Unrestricted -File "c:\program files (x86)\Microsoft SDKs\WindowsPhoneApp\v8.1\Tools\MDILXAPCompile\BuildMDILAPPX.ps1" -appxfilename "C:\SignApps\App.appx" -pfxfilename "c:\SignApps\Certificate.pfx" -password ***** -inputFolder "C:\SignApps\input" -outputfolder "C:\SignApps\output"

The signing process throw this error:

MakeAppx : error: You must include a valid app package manifest file named AppxManifest.xml in the source.
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080203 - The specified package format is not valid: The file is not a valid app package because it is missing a required footprint file.

The apps are build through cordova. When i use the Windows 8.1 Universal App, the signing works. Using the Windows 10, it fails. The app will be provided over a mdm (where the AET is already added).

How do i sign correctly?

Environment

OS: Windows 8.1 Enterprise

IDEs installed: Visual Studio Community 2013 & 2015

IDE used: Visual Studio Community 2015

VS Project details: Apache Cordova, WinJS, angularjs

Certificate: Company certificate from symantec, received from extern company

cordova
certificate
win-universal-app
windows-10-universal
windows-10-mobile
asked on Stack Overflow Apr 12, 2016 by tvelop • edited May 24, 2016 by karann - MSFT

1 Answer

0

Try with this command : signtool sign /fd <HashAlgorithm> /a /f c:\SignApps\Certificate.pfx /p <Your pfx password> App.appx

So, your original app will be signed.

Note : Signtool is installed by installing Windows SDK 10 and added "C:\Program Files (x86)\Windows Kits\10\bin\x64" this path in environment variable. You'll get your app HashAlgorithm by this method :

  • Rename your app to .zip then extract this file AppxBlockMap.xml
  • Now search for the following : HashMethod= "http://www.w3.org/2001/04/xmlenc#
  • After xmlenc# there will be your hash algorithm for example in mine case : HashMethod="http://www.w3.org/2001/04/xmlenc#sha256" it is sha256
answered on Stack Overflow Jan 30, 2018 by Salman Momin • edited Jan 30, 2018 by Salman Momin

User contributions licensed under CC BY-SA 3.0