UWP - No certificate found with the supplied thumbprint

12,335

Solution 1

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.

Solution 2

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.

Solution 3

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.
Share:
12,335
b.pell
Author by

b.pell

Updated on June 28, 2022

Comments

  • b.pell
    b.pell almost 2 years

    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.

  • b.pell
    b.pell over 4 years
    Thank you for your response. Cleaning the solution/restart then rebuild didn't work. I can delete the test certificate and then create a new one but I don't want to have to do that every time I switch from my desktop to my laptop. I'm curious why the package manifest UI sees the cert as valid on one machine and allows me to choose it but not on another.
  • Richard Zhang
    Richard Zhang over 4 years
    Hi, please check if your certificate is imported into the Local Computer -> Trusted Root Certification Authorities folder when you install the certificate on your laptop.
  • b.pell
    b.pell over 4 years
    It is in Local Computer -> Trusted Root Certification Authorities. The manifest UI still says "No certificates meet the application criteria.". I also changed the thumbprint in the csproj to be the thumbprint of the cert. No go. This cert does work on the other computer.
  • Richard Zhang
    Richard Zhang over 4 years
    Hi, you generated the certificate on the A computer and then tried to use it to develop on the B computer and got an error. This may be because some of the feature values in the certificate do not match your target computer. I still recommend that you delete the original certificate in the project when you use the Visual Studio development project on a new computer. If you use git for code management, try adding the certificate file to .gitignore
  • b.pell
    b.pell over 4 years
    Ok, I would then need to remove or blank out the "PackageCertificateThumbprint" from the csproj file (because it would have conflicting values based on the different certs)? If I have a cert on computer A and set it in the manifest it puts that "PackageCertificateThumbprint" in the csproj file. If computer B has a different cert, that that value no longer matches and has to be removed (which is why I tried to use the same cert).
  • Richard Zhang
    Richard Zhang over 4 years
    You don't have to modify the csproj file, usually, you need to rebuild the project. Or set the PackageCertificateThumbprint to empty string.
  • b.pell
    b.pell over 4 years
    Thank you for your assistance, I appreciate it. Som setting the PackageCertificateThumbprint to empty is what seems to work to let me develop on two boxes and then I have either have to put the cert back in on my desktop when I create a side load package or create a second cert for the laptop (and then use the one for the box I'm on). That's doable, it's just a hassle.
  • praveena H M
    praveena H M about 2 years
    This helps me. Just to create temporary certificate :). BOOOM