How can I sign my Windows Store app from Window Store certificate?

后端 未结 3 652
谎友^
谎友^ 2021-01-12 16:30

I have just bought my developer account from the Windows Store, and I would like to sign my app before uploading. When I go inside the packaging and then I click on the choo

3条回答
  •  耶瑟儿~
    2021-01-12 17:16

    Not sure if this is related/helpful but FWIW I recently had to get a codesign certificate for my windows store app (for local testing/installs). The following command line scripts work for me in case they help anyone else.

    Part 1: Generate the Cert

    (Run these from Visual Studio 201x Command Prompt)

    # 1) Generate .PVK and .CER
    MakeCert /n "CN=YourMSPartnerPublisherIDString" /r /h 0 /eku "1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.10.3.13" /sv MyAppName.pvk MyAppName.cer
    
    # 2) Generate .PFX
    Pvk2Pfx /pvk  MyAppName.pvk /pi "password" /spc MyAppName.cer /pfx MyAppName.pfx /po "password"
    

    Part 2: Create the APPX from EXE and sign the APPX w/the Cert

    (Run these from Command Line as Administrator)

    # 3) Generate APPX from EXE
    # (Assumes you have your App EXE and valid AppManifest.xml in C:\MyAppFolder\AppxPackage folder)
    "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\makeappx.exe" pack /p "C:\MyAppFolder\MyAppName.appx" /d "C:\MyAppFolder\AppxPackage"
    
    # 4) Sign APPX with Cert
    "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\signtool.exe" sign /fd sha256 /a /f "C:\MyAppFolder\CertMyAppName.pfx" /p password "C:\MyAppFolder\MyAppName.appx"
    

提交回复
热议问题