I'm trying to use the Microsoft Desktop App Converter (AKA Desktop Bridge) and our publisher name has a comma, space and period in it.
eg. CN="Acme, Inc."
This does not work:
DesktopAppConverter.exe -Installer .\Installer.msi -Destination AppxFolder -PackageName "AcmeApp" -Publisher "CN=Acme, Inc." -Version 1.0.0.0 -MakeAppx
I've tried various ways to escape the quotes like:
-Publisher "CN=\`"Acme`, Inc.\`""
results in:
A positional parameter cannot be found that accepts argument 'Inc.'.
This:
-Publisher 'CN="Acme, Inc."'
results in:
Appx manifest validation failed because of an invalid input: 'Publisher' cannot be assigned a value 'CN=Acme, Inc.' Original Error: 'Exception calling "SetPackageIdentityPublisher" with "1" argument(s): "Validating AppxManifest.xml against schemas failed with error(s): Error found in XML (0): The 'Publisher' attribute is invalid - The value 'CN=Acme, Inc.' is invalid according to its datatype 'http://schemas.microsoft.com/appx/manifest/types:ST_Publisher_2010_v2' - The Pattern constraint failed.
This:
-Publisher 'CN="Acme\`, Inc."'
results in:
Appx manifest validation failed because of an invalid input: 'Publisher' cannot be assigned a value 'CN=Acme`, Inc.' Original Error: 'Exception calling "SetPackageIdentityPublisher" with "1" argument(s): "Validating AppxManifest.xml against schemas failed with error(s):
Error found in XML (0): The 'Publisher' attribute is invalid - The value 'CN=Acme`, Inc.' is invalid according to its datatype 'http://schemas.microsoft.com/appx/manifest/types:ST_Publisher_2010_v2' - The Pattern constraint failed.
This:
-Publisher "CN=Acme, Inc."
results in:
Appx manifest validation failed because of an invalid input: 'Publisher' cannot be assigned a value 'CN=Acme, Inc.' Original Error: 'Exception calling "SetPackageIdentityPublisher" with "1" argument(s): "Validating AppxManifest.xml against schemas failed with error(s): Error found in XML (0): The 'Publisher' attribute is invalid - The value 'CN=Acme, Inc.' is invalid according to its datatype 'http://schemas.microsoft.com/appx/manifest/types:ST_Publisher_2010_v2' - The Pattern constraint failed.
This:
-Publisher "CN='Acme\, Inc.'"
results in:
A positional parameter cannot be found that accepts argument 'System.Object[]'.
This:
-Publisher "CN=Acme\, Inc."
results in:
Appx manifest validation failed because of an invalid input: 'Publisher' cannot be assigned a value 'CN=Acme\, Inc.' Original Error: 'Exception calling "SetPackageIdentityPublisher" with "1" argument(s): "Validating AppxManifest.xml against schemas failed with error(s): Error found in XML (0): The 'Publisher' attribute is invalid - The value 'CN=Acme\, Inc.' is invalid according to its datatype 'http://schemas.microsoft.com/appx/manifest/types:ST_Publisher_2010_v2' - The Pattern constraint failed.
It's pretty annoying because we need the publisher name to be set perfectly or else the signing won't work afterwards because it won't match the publisher name in our code signing cert.
What's the correct way to do this?