[VS2019]cannot 'Create App Package' - 'certificate has expired' Problem

RobDev 411 Reputation points
2020-09-28T15:01:51.587+00:00

Hi All,

I'm trying to create an package for my app with VS2019 (version 16.7.4). It always fails with the following message: "The certificate specified has expired.". This happens whenever I try to create an app package - I'm intending to publish the app to the Windows Store. Now, the documentation states the following:

"If you're publishing your app in Microsoft Store, your app will be signed with a trusted certificate for you. This allows the user to install and run your app without installing the associated app signing certificate."

My app was initially created some time ago with VS2017 and was allocated a temporary certificate in the file <>_TemporaryKey.pfx file.

Why wasn't my app signed with a trusted certificate as the documentation stated?
More importantly, how to I proceed from here?

Developer technologies Visual Studio Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    2020-09-29T03:31:59.233+00:00

    Hi Robert,

    Could you tell me what certificate you use? Did you use your own certificate from local or use the certificate after you associate the package with the Store?

    This issue may be caused by tools, VS or missing steps which were mentioned in official document Package a desktop or UWP app in VS. Since the error indicated that it has expired, I suggest you can try to create a new certificate and test again (package.appxmanifest > Package > Choose a Certificate > Create and make sure that the name is the same with the Publisher Id).

    Sincerely,
    Tianyu

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

  2. RobDev 411 Reputation points
    2020-10-01T13:52:11.353+00:00

    Hi Tianyu,

    many thanks for your reply. I was wary of generating a new certificate using VS2019 because the 'Create Certificate' functionality didn't seem to match what other people said about it on the forums i.e. no 'Generate a Test Certificate' option. However, I did find that option o VS2017 and used that to generate a Test Certificate. Now this may be exactly the same functionality that VS2019 has but with a different name, if it is that's even more confusing.
    Anyway, before I try, again, to create a package for my app I would like to ask you another question about that process. There is an option in the VS2019 'Create App Packages' process which is the 'Automate Store Submissions' option. It requires that I associate my Partner Centre account with with an Azure Active Directory. It says that "can create a new Azure AD tenant from within Partner Center at no additional charge", which is what I believe I did. However, the documentation then goes on to say the following:

    "Add an Azure AD application to your partner Center account. This Azure AD application represents the app or service that you will use to access submissions for your Dev Center account. You must assign this application to the Manager role. If this application already exists in your Azure AD directory, you can select it on the Add Azure AD applications page to add it to your Dev Center account. Otherwise, you can create a new Azure AD application on the Add Azure AD applications page."

    And then states:

    "Next, you can retrieve the Partner Center credentials required for submissions: the Azure Tenant ID, the Client ID and the Client key."

    Well, I seem to have an Azure Tenant ID but not a Client ID or Client Key. Are these generated as part of the package creation process? If not where do I find them?

    Also, if I don't tick the "Automatically submit to the Microsoft Store after Windows App Certification Kit validation" option, how do I submit my app to the Microsoft Store?

    Sorry to be asking so many questions but this is my first attempt at publishing an app to the MS Store and I don't want to mess it up. Also, I've not used Azure before.

    Kind regard,

    Robert


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.