如何使用可以侧面加载的证书创建UWP应用 [英] How to created a UWP app with a certificate that can be sideloaded

查看:70
本文介绍了如何使用可以侧面加载的证书创建UWP应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个可以侧面加载到其他PC的UWP应用。
我的主要问题是:我是否需要来自可信来源的证书来签署我的申请?

I am trying to create a UWP app that can be sideloaded onto other PCs. My main question is: Do I need a certificate from a trusted source to sign my application?

经过大量的探索,我了解到您可以通过应用程序应用安装程序。安装应用安装程序后,可以双击 .appxbundle 文件来安装UWP应用。 (不使用 .ps1 文件,如

After a lot of poking around, I learned that you can sideload/install UWP applications through the application App Installer from the Windows Store. After installing the App Installer, one can install UWP apps by double clicking on the .appxbundle file. (Not using the .ps1 file, as indicated here)

在执行此操作之前,我需要信任证书。我已经通过Visual Studio创建了此证书。通过双击 .appxmanifest 转到 Packaging ,然后选择 Choose Certificate -> 配置证书,然后创建测试证书

Before doing this, I would need to trust the certificate. I've created this certificate through Visual Studio. It was created by double clicking the .appxmanifest going to Packaging, selecting Choose Certificate -> Configure Cerfiticate and then Create test certificate.

我尝试在两台不同的Windows 10计算机上安装我的应用程序。在一台机器上,应用程序将失败,说该程序包可能与另一个程序包发生冲突,或者依赖于未安装的东西(有些不正确),而在另一台机器上,它将给出证书错误(即使我受信任并将证书添加到我的根受信任证书中)。

I tried to install my application on two different Windows 10 machines. On one machine, the application would fail by saying that the package might conflict with another package or depends on things that aren't installed (something that isn't true) and on the other machine it would give a certificate error (even though I trusted and added the certificate to my root trusted certificates).

我需要受信任的权威机构发布的证书才能使该证书正常工作吗?我的印象是,只要用户信任我的证书,它就可以正常工作,但是该应用似乎没有安装。

Do I need a certificate released by a trusted authority to get this to work? I was under the impression that my certificate should work, as long as the user trusted it, but the app doesn't seem to install.

此外,如果我确实需要受信任的证书,如何创建此 pfx 文件?我从哪里得到呢? Microsoft文档似乎未提及任何内容。

Also, if I do need a trusted certificate, how do I create this pfx file? And where do I get it from? The Microsoft documentation doesn't seem to mention anything.

推荐答案

事实证明我没有安装依赖项。我将证书添加到了 受信任的根权限部分中的 本地计算机(不是当前用户)中。在此之后,我仍然收到错误消息,认为软件包取决于未安装的东西。事实证明这是真的!根据应用安装程序页面

It turns out that I didn't have the dependencies installed. I added the certificate to the Local Computer (not Current User) in the Trusted Root Authorities Section. After this I was still getting the error that the package depends on things that weren't installed. This turned out to actually be true! According to the App Installer page


应用程序安装程序不会自动安装框架依赖项。在大多数情况下,您的设备已经具有依赖项,但是在某些开发人员或企业方案中,您需要其他框架。在这种情况下,只需使用应用程序浏览到依赖项文件夹,然后使用应用程序安装程序像安装任何应用程序一样安装依赖项框架!

The App Installer does not automatically install framework dependencies. In most cases your device already has the dependencies, but there are some developer or enterprise scenarios where you need an additional framework. In this case just browse to the dependency folder with your app and install the dependency framework just like any app, using the App Installer!

依赖关系全部位于由Visual Studio创建的名为依赖关系的文件夹中。安装完这些后,应用程序安装成功!

The Dependencies were all located in a folder called "Dependencies" that was created by Visual Studio. After installing those, the App installed successfully!

这篇关于如何使用可以侧面加载的证书创建UWP应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆