I figured it out. The certificate must have type - CodeSigning. That's done with Powershell via an additional parameter:
New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\My -DnsName "mysite.local" -Type CodeSigning -FriendlyName "MySiteCert" -NotAfter (Get-Date).AddYears(10)
FOLLOW US
Get the latest news in Application Packaging