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

7

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.

c#
uwp
msbuild
vstest.console.exe
asked on Stack Overflow Mar 23, 2018 by Ash

2 Answers

3

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.

answered on Stack Overflow Mar 26, 2018 by Breeze Liu - MSFT
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.

answered on Stack Overflow Jan 2, 2019 by M'hand BOUGHIAS • edited Jan 2, 2019 by M'hand BOUGHIAS

User contributions licensed under CC BY-SA 3.0