DAC IconWhen using the Desktop App Converter there’s no need to sign the resulting .appx packages with your own code signing certificate when you submit them to the Store.

However if you want to test the package on a different machine or distribute it to test users you may want to sign the .appx with a certificate.

One option is to use the -sign parameter, in this case the Desktop App Converter generates a code signing certificate and signs the package with it. Although easy to use, it’s not very convenient if you want to distribute the .appx as you need to add the certificate to the Trusted People certificates store (for each user). See Run the Packaged App in the documentation.

imageIf you want to sign the .appx package with a trusted certificate (e.g. issued by a trusted certificate authority such as DigiCert) you need to make sure that you pass the subject (the CN) from your code signing certificate to the Desktop App Converter (using the -Publisher parameter).

In my case the CN for the certificate is E=support@cloudhouse.com,CN=Cloudhouse Technologies Limited,O=Cloudhouse Technologies Limited,L=London,S=London,C=GB as can be seen from the following screenshot:


However if we pass this value on the Desktop App Converter we get the following error message: “Cannot validate argument on parameter ‘Publisher’. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again“.

Desktop App Converter

I saw a couple of people asking about this exact issue on stackoverflow (here for example) but the suggested answer didn’t work for me.

I noticed that when I view the certificate in PowerShell that the attributes in the CN have a space after the comma:


So next attempt was to insert the spaces and rerun the command but unfortunately that failed with the same error.

I then tried to call the same command from PowerShell (as the Desktop App Converter is really a PowerShell script) and t

hat worked!


I also tried the CN without spaces but this continues to fail, even when launched from PowerShell:


So the working recipe is launch from PowerShell and seperate the attributes in the CN with a space, followed by a comma!