Can vstest.console.exe run an appx without a security certificate

梦想与她 提交于 2020-01-03 10:58:47

问题


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.

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..

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.


回答1:


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.




回答2:


Actually there is a way to run a UWP unit test using vstest.console.exe without having to install any certificate: Pass to vstest.console.exe the .appxrecipe file instead of the .appx file.

It will deploy the UWP unit test app from its current build location and be able to start the tests.



来源:https://stackoverflow.com/questions/49442040/can-vstest-console-exe-run-an-appx-without-a-security-certificate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!