UWP-SignTool错误:未找到符合所有给定条件的证书 [英] UWP - SignTool Error: No certificates were found that met all the given criteria

查看:209
本文介绍了UWP-SignTool错误:未找到符合所有给定条件的证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们公司更改了其AD域后,我收到了此错误消息. 使用VS 2019和Windows 10(1903)进行UWP应用开发

I'm getting this error after our company changed its AD domain. UWP app development with VS 2019 and Windows 10 (1903)

C:\ Program Files(x86)\ Microsoft Visual Studio \ 2019 \ Community \ MSBuild \ Microsoft \ VisualStudio \ v16.0 \ AppxPackage \ Microsoft.AppXPackage.Targets(4469,5):错误APPX1204:无法签署' D:\ AzureDevOps-Workspace \ UWP \ Main \ BoardPACWinApp \ bin \ x64 \ Release \ BoardPACWinApp_3.51.11.0_x64.appx'. SignTool错误:找不到符合所有给定条件的证书. 5> C:\ Program Files(x86)\ Microsoft Visual Studio \ 2019 \ Community \ MSBuild \ Microsoft \ VisualStudio \ v16.0 \ AppxPackage \ Microsoft.AppXPackage.Targets(4469,5):错误APPX1204: ===========内部版本:4个成功,1个失败,1个最新,跳过0个==========

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets(4469,5): error APPX1204: Failed to sign 'D:\AzureDevOps-Workspace\UWP\Main\BoardPACWinApp\bin\x64\Release\BoardPACWinApp_3.51.11.0_x64.appx'. SignTool Error: No certificates were found that met all the given criteria. 5>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets(4469,5): error APPX1204: ========== Build: 4 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

一旦我们迁移到新域,没有人可以创建一个应用程序包以发布到Microsoft商店或旁载. 项目正在调试和发布模式下运行.唯一的问题是它不允许发布.

As soon as we've migrated to the new domain no one can create an app package to publish to the Microsoft store or to sideload. Project is running under debug and release modes. Only issue is that it does not allow to publish.

我尝试在VS 2015上打开项目并创建测试证书,但没有成功. (尽管不确定测试证书必须对此错误采取任何措施) 在UWP中,默认情况下禁用签名"选项卡.

I have tried opening the project on VS 2015 and creating a test certificate but no luck. (Not sure the test certificate has to do anything about this error though) In UWP, Signing tab is by default disabled.

一切正常,直到域更改.在新域上还赋予了我们管理权限.

Everything was ok until the domain change. Administer privileges also given to us on the new domain.

我尝试修复VS 2019,但没有更改.

I tried repairing the VS 2019 and no change.

signtool.exe也可以在PC中使用.

signtool.exe also available in the PC.

我查看了详细启用的输出窗口,以查看是否缺少任何内容.但除了未找到符合所有给定条件的证书"之外.没有其他问题记录.

I looked at the verbose enabled output windows to see if anything is missing. but besides "No certificates were found that met all the given criteria." there were no other issue logged.

我可以看到所有有效的证书并且它们还没有过期

I can see all the valid certificates and they haven't got expired

高度赞赏您的所有解决方案和指导.谢谢.

Highly appreciated all your solutions and guidance. Thank you.

推荐答案

好消息!我找到了一个对我有用的解决方案,希望对您也一样.

Good news! I found a solution which worked for me and I hope this will works for you all as well.

当您的域更改后,您在UWP应用上使用的所有测试证书都将失效.因此,您必须在新域上创建新证书才能使应用发布正常工作.我不是命令行的忠实拥护者,所以我做的是,使用VS 2015,按照下图生成测试证书.在VS 2019中完成创建它后,您将看到在新域下创建的新证书,它就像一个吊饰一样工作.

When your domain changed all the test certificates you used on your UWP app will gets invalid. SO you have to create a new certificate on new domain in order to get the app publishing to work. I'm not a big fan of command line so what I did was, using the VS 2015 I generates a test certificate as per the image below. When it's done creating it in VS 2019 you will see the new certificate you create under new domain and it works like a charm.

我听说了 MakeCert工具可用于创建证书,而无需VS 2015.

I heard MakeCert tool can be used to create the certificate without needing the VS 2015.

您还可以创建可由同事使用的证书.请参考下图.

You also can create a certificate that can be used by your co-workers. Refer to the image below.

使用IE来获取您的代码签名证书,并按照上面的截图进行导出.只需在导出时添加他们的域帐户,然后要求他们将其导入到PC上的当前用户"下即可.

Use the IE to get to your code signing certificates and do the export as per the screenshot above. Simply add their domain accounts when exporting and ask them to import it under "Current user" on their PC.

这篇关于UWP-SignTool错误:未找到符合所有给定条件的证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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