如何在另一台Windows机器上通过自签名的.NET MAUI应用进行侧加载?

huangapple go评论71阅读模式
英文:

How to Side-load onto another Windows machine with a Self-signed .NET MAUI app?

问题

我使用 PFX 文件为 .NET MAUI Windows 应用创建了一个 MSIX 安装包,并使用自签名证书。当我尝试在另一台运行 Windows 10 的计算机上安装它时,出现以下消息:"此应用程序包的发布者证书无法验证。请联系您的系统管理员或应用程序开发人员以获取具有已验证证书的新应用程序包。应用程序包中签名的根证书和所有直接证书必须经过验证 (0x800B010A)。" 部署目录中包含了 MyApp.msix 和 MyApp.cer 文件。在我的开发计算机上,使用 MSIX 文件进行安装没有问题。

我该如何使用这些文件在另一台没有创建证书的计算机上进行安装?

英文:

I created an installation package with MSIX out of a .NET MAUI Windows app and a self-signed certificate, using a PFX file.

When I try installing it on another Windows 10 machine, I get the following message: "This app package’s publisher certificate could not be verified. Contact your system administrator or the app developer to obtain a new app package with verified certificates. The root certificate and all immediate certificates of the signature in the app package must be verified (0x800B010A)". The deployment directory has MyApp.msix and MyApp.cer in it. On my development machine it is no problem to install using the MSIX file.

How do I use these files to install onto another machine that did not create the certificate?

答案1

得分: 3

I found the answer in this video by Gerald Versluis: Create a .NET MAUI Windows MSIX to Sideload Or Publish to the Microsoft Store

I needed to follow these steps:

  1. Open the Certificate, MyApp.cer, by double-clicking.
  2. Click on Install Certificate
  3. In the Certificate Import Wizard window,
    1. Select Local Machine and click Next
    2. Select Place all certificates in the following store
    3. Browse and select Trusted Root Certification Authorities
    4. Click Next and take defaults.
      After this you should see a pop-up stating that "The import was successful." You now can proceed to side-load install the .NET MAUI app.

This worked for me. There might be minor variations that work as well.

英文:

I found the answer in this video by Gerald Versluis: Create a .NET MAUI Windows MSIX to Sideload Or Publish to the Microsoft Store

I needed to follow these steps:

  1. Open the Certificate, MyApp.cer, by double-clicking.
  2. Click on Install Certificate
  3. In the Certificate Import Wizard window,
    1. Select Local Machine and click Next
    2. Select Place all certificates in the following store
    3. Browse and select Trusted Root Certification Authorities
    4. Click Next and take defaults.
      After this you should see a pop-up stating that "The import was successful." You now can proceed to side-load install the .NET MAUI app.

This worked for me. There might be minor variations that work as well.

huangapple
  • 本文由 发表于 2023年4月4日 03:25:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/75923100.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定