LocalJoost / QRCodeService

Show a MRTK2 service to read (and position) QR codes using HoloLens 2
MIT License
75 stars 25 forks source link

WSATest certificate in project expired? #16

Closed YichenWangs closed 1 year ago

YichenWangs commented 1 year ago

Hello Joost,

I was trying to deploy this example to my HoloLens and found the VS2019 gave me the error "Certificate cannot be opened: WSATestcertificate.pkx ".

I encountered this issue before working on other projects - usually it can be fixed by regenerating a new certificate in Unity. I've tried to recreate one, delete the old one, recreate one again for a few times - making sure it's not expired/new. But every time it gives me the same error when it tries to build in VS.

I also tried to use the "fully built package" version mentioned in your post - it also gave me an error saying the publisher certificate could not be verified and suggested me to contact app developer when I attempted to open the package.

Any clues why? Thanks in advance!

LocalJoost commented 1 year ago

I assume you mean this package: https://1drv.ms/u/s!AjesCJDYqwYk2Zc7XqpooYbolCqA5A?e=aE3SZq Have you tried installing it via the Windows Device Portal? Works fine with me :) image

As to the PFX: make sure to close Unity, delete all instances of the PFX, and try again

YichenWangs commented 1 year ago

Hello Joost,

Thanks for your advice! It worked!

I tried your advice on PFX - tho it's slightly different. I followed by delete all pfx in the unity project folder, and create a new build files for deployment. Originally it gave me the same error in VS code. Then I noticed in VS "Solution Explorer" there was another .pfx, I deleted it directly and the deployment worked in seconds!

I haven't tried using device portal yet.

Thanks again and hope above notes can be helpful for others too!