17
votes

I have a UWP app I work on from two difference devices. After the latest Visual Studio 2019 update I began receiving this error:

No certificate found with the supplied thumbprint: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The app previously had the temporary key Visual Studio used to auto generate that it no longer does. I generated a new key file from the instructions at this link https://docs.microsoft.com/en-us/windows/msix/package/create-certificate-package-signing and that worked on my desktop. I was able to select the certificate in the package manifest, update the "PackageCertificateThumbprint" in the csproj file and then both build and create the sideload package.

Now, switch to my laptop. I get the above errors again even though I've brought the cert I created over to that machine. The package GUI tells me that there isn't a valid cert to use. I've tried adding that cert to the local machine to no avail.

  1. What am I missing that I should be doing?
  2. My goal is to be able to develop on two different workstations without having to do a dance of creating a new cert everytime I switch one or have to update the csproj file every time I switch from one to the other.

This is a personal project, it's not to the point of going to the store but I do need to dev on two boxes and create side load packages for a set of testers.

4
That I don't know, in the end I didn't want to buy a certificate for a hobby project in order to side load or develop on multiple machines where it resided. I ended up converting the project to WPF/.NET Core 3.1. Completely happy with that decision. I also created a self signed cert but at the time Visual Studio continued to give me errors when I'd switch between my laptop/desktop. It's fully possible I didn't have a setting correct (and this was 8-9 months ago so it could be different now).b.pell

4 Answers

19
votes
  1. Right click the project -> Properties -> Package Manifest
  2. On the Package.appxmanifest go to Packaging tab -> Choose Certificate
  3. In the new window click "Select a Certificate..." if you have one, or create a certificate if you haven't created one (https://docs.microsoft.com/en-us/windows/uwp/packaging/create-certificate-package-signing)

Source - https://github.com/microsoft/AdaptiveCards/issues/3194#issuecomment-516100011

2
votes

Unload project. Edit project file. Make sure package cert is the same as the one you intend to use.

When i switched to vs 2019 it switched to an old one.

1
votes

You can try two ways to solve this problem:

  1. Clean solution and restart the visual studio then rebuild the solution.

  2. Delete the test certificate.

Best regards.

1
votes

It may old certificate invalid or no Certificate Available, so that we need to create new certificate following way:

  1. Double Click Package.appxmanifest file
  2. Go to the Packaging tab.
  3. the 'Choose Certificate…' button.
  4. Click Create
  5. if Developer Mode is disable kindly enabled
  6. Click OK
  7. Rebuild Project its working fine.