20

I created app for uwp (win 10 desktop). I could not build package for store. I received an error: it is necessary to update the certificate. I have updated certificate and build my package. But when I upload the package to the store, I get the error:

Invalid package family name: MyPackage.xxxx_xxxx (expected: MyPackage.yyyy_yyyyy)
Invalid package publisher name: CN=XYX (expected: CN=xxx-xxxx-xxx-xxxx)

But I opened my app manifest and I see:

Published: CN=xxx-xxxx-xxx-xxxx
Package Family Name: MyPackage.yyyy_yyyyy

It is what expected. In "open sertificate" I see : Publisher -XYX.

How do I fix it all? Any ideas?

Zhendong Wu - MSFT
  • 1,769
  • 1
  • 8
  • 10
FetFrumos
  • 5,388
  • 8
  • 60
  • 98

5 Answers5

28

I solved this issue. I made a mistake when creating new certificate. It must be so:

  1. Open Package.appxmanifest.
  2. Go to the "Packaging" tab.
  3. Copy Publisher DN(number after CN=)
  4. Click the button "Choose Certificate" and select the item "Create test certificate..."
  5. Copy the publisher DN from step 3 to the first editable text field
FetFrumos
  • 5,388
  • 8
  • 60
  • 98
  • In my case, i had to copy the Publisher (The part after "CN=") for this to work. With the DN, it was still changing my package family name. – Jérôme S. Jun 04 '17 at 10:13
  • 1
    I'm on 2019 Preview and I don't see "Create Test Certificate" option. – Xonshiz Sep 09 '19 at 11:39
  • I haven’t been involved in UWP for several years. during this time, much could change – FetFrumos Sep 09 '19 at 11:57
  • 1
    This post helped me, but I also had to right click on my project, and choose Store->Associate App with Store (even though I had done this previously) to get this working. – Greg Thatcher Nov 01 '19 at 22:03
19

Update for Visual Studio 2019

  1. Open Package.appxmanifest from Solution Explorer
  2. Go to "Packaging" tab
  3. Copy Publisher name after CN=. Looks like a GUID
  4. Click "Choose Certificate..."
  5. Click "Configure Certificate..."
  6. Click "Create..."
  7. Paste GUID from #3 into "Publisher Common Name"
  8. Proceed to create and save certificate

Problem seems that it defaults to developer name instead of using the original GUID

under
  • 2,519
  • 1
  • 21
  • 40
  • 1
    Wow, thanks for this. I had to update a UWP app that used to publish just fine, but suddenly ran into these errors. The only change was building in 2019 and this work around fixed it. – Andy Kachelmeier Jun 23 '20 at 13:00
7

I found this MSDN blog: https://blogs.msdn.microsoft.com/jamiedalton/2017/01/13/windows-store-error-updating-package-invalid-package-family-name/

The blog states that you should associate your App to the Store App using Visual Studio.

This seems to be the right answer.

NP3
  • 652
  • 8
  • 21
0

For us, the problem was that we tried to publish the app before associating it with a submission. The fix was the following:

  1. Delete the temporary key .pfx file at the root of the directory
  2. Re-associate the app with the store via the Publish menu
bobbyg603
  • 3,536
  • 2
  • 19
  • 30
0

This issue still exists even in Visual Studio 2022. I have been trying to complete my .net MAUI app and the "Store Association" has been my biggest headache and obstacle. No matter how many times i did the "Store Association" i could never get it to stay associated. All my problems for the last 6 weeks have been caused by the CN on the certificate being wrong. And i didnt realize it until i decided to upload to the store to see if that would help and i got the error mentioned.

Kevin
  • 17
  • 4