本文介绍了vstest.console.exe可以在没有安全证书的情况下运行appx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在命令行上使用MSBuild在我的构建代理上设置自动化构建.我目前关注的两个项目是UWP及其相关的单元测试项目.

I'm trying to set up automated builds on my build agent using MSBuild on the command line. The two projects I'm focussed on at the moment are a UWP and it's associated unit test project.

要构建,我必须使用它:

To build, I have to use this:

/p:AppxPackageSigningEnabled=false

否则,我会收到此错误:

Else, I get this error:

error APPX0101: A signing key is required in order to package this project. Please specify a PackageCertificateKeyFile or PackageCertificateThumbprint value in the project file.

但是,这不会生成.cer安全证书.因此,当我运行vstest.console.exe时,出现此错误:

However, this does not generate a .cer security certificate. So when I run vstest.console.exe, I get this error:

error 0x800B0100: The app package must be digitally signed for signature validation..

问题:是否可以使vstest.console.exe在没有.cer的情况下运行,如果没有,我如何才能构建所有内容并同时运行测试?我不希望开发人员使用临时的.pfx文件.

Question: Can vstest.console.exe be made to run without a .cer, and if not, how can I get everything building and my tests running as well? I don't want devs to use temporary .pfx files.

推荐答案

必须对UWP软件包进行签名,因此,如果没有.cer,它应该无法运行.请参阅签署证书的最佳做法创建用于包签名的证书主题,首先要创建签名证书.

A UWP package must be signed, so it should not be able to made to run without a .cer. Please see the Best Practices for Signing Certificates and Create a certificate for package signing topics to create a signing certificate firstly.

这篇关于vstest.console.exe可以在没有安全证书的情况下运行appx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 21:55