更改现场申请和购买的证书

Changing certificate for live application and purchases

我在 Xamarin UWP 商店中有一个实时应用程序,我已经实施了试用版和付费版,运行良好。现在我想在从 PCL to.Net 标准 2.0 转换后发布应用程序的新更新。当我构建时,我收到证书错误,它要求我输入我上传到服务器的证书的密码。

它不接受我的密码。我很确定我输入了正确的密码。我不知道原因。所以我的问题是;

  1. 证书在LicenseInformation中有什么作用吗?我基本上是用下面的代码检查它是否是试用版。如果我创建新证书,是否会对现有购买产生任何影响?

  2. 我尝试使用本地 CurrentAppSimulator 使用新证书,一切正常,但尽管我重新关联到商店应用程序,但使用 CurrentApp 时出现异常,如下所示。是因为我使用的证书与商店中的证书不同吗?那么如果我提供一个新的提交和一个新的证书,问题就解决了吗?

System.ExceptionException from HRESULT: 0x803F6107 Raw at Windows.ApplicationModel.Store.CurrentApp.get_LicenseInformation()

 #if !DEBUG
 licenseInformation = CurrentApp.LicenseInformation;
  #else
 licenseInformation = CurrentAppSimulator.LicenseInformation;
  #endif
  licenseInformation.LicenseChanged +=LicenseInformation_LicenseChanged;
 if (licenseInformation.IsActive)
   {
  if (licenseInformation.IsTrial)
    {

Now I want to publish a new update of the app after I converted from PCL to .Net Standard 2.0.

如果你切换到最新的.NET Standard 2.0,你最好使用Windows.Services.Store namespace relevant APIs instead. The Windows.ApplicationModel.Store Namespace文档已经解释清楚了。

The Windows.ApplicationModel.Store namespace is no longer being updated with new features. If your project targets Windows 10 Anniversary Edition (10.0; Build 14393) or a later release in Visual Studio (that is, you are targeting Windows 10, version 1607, or later), we recommend that you use the Windows.Services.Store namespace instead. For more information, see In-app purchases and trials. The Windows.ApplicationModel.Store namespace is not supported in Windows desktop applications that use the Desktop Bridge or in apps or games that use a development sandbox in Dev Center (for example, this is the case for any game that integrates with Xbox Live). These products must use the Windows.Services.Store namespace to implement in-app purchases and trials.