During UWP app VS publish , how to integrate signing with security token and pin?

DotNET Fan 151 Reputation points
2023-11-10T07:39:52.06+00:00

Hello Microsoft UWP Experts ,

I have a UWP app associated with the windows store and during VS publish and creating the packages , I would like to sign the package using Yubi Key security token with Pin. Even though i have selected the right publisher with certificate in the Package.appxmanifest, when publishing it picks up some random certificate from the local store.

If i use the signtool manually in command line t asks for the Security Pin , but unable to sign .msixupload/.msixbundle and throws with errors

"D:\Windows Kits\10\bin\10.0.22621.0\x64\signtool.exe" sign /fd sha256 /tr http://ts.ssl.com /td sha256 /sha1 2277221b9ee1c53db704665ff171032506233d85" AppPackages\XXXX_1.1.0_x86_x64_bundle.msixupload"

Error-

Done Adding Additional Store

SignTool Error: This file format cannot be signed because it is not recognized.

SignTool Error: An error occurred while attempting to sign: AppPackages\XXXX_1.1.0_x86_x64_bundle.msixupload

"D:\Windows Kits\10\bin\10.0.22621.0\x64\signtool.exe" sign /fd sha256 /tr http://ts.ssl.com /td sha256 /sha1 2277221b9ee1c53db704665ff171032506233d85 "AppPackages\XXXX_Test\XXXX_2.3.3.0_x86_x64.msixbundle"

Error-

Done Adding Additional Store

SignTool Error: An unexpected internal error has occurred.

Error information: "Error: SignerSign() failed." (-2147024885/0x8007000b)

During VS publish what is the right way to sign the UWP packages/dll using security token and with PIN ?

Microsoft Partner Center
Microsoft Partner Center
A Microsoft website for partners that provides access to product support, a partner community, and other partner services.
805 questions
{count} votes