DesktopAppConverter 错误 "A positional parameter cannot be found that accepts argument"

DesktopAppConverter error "A positional parameter cannot be found that accepts argument"

我对微软恨之入骨!我正在尝试将我的 Win32 应用程序转换为 UWP。 (我的应用程序已经在 Windows 10 商店中。这是一个更新。)上次我大约一年前使用从 Microsoft 页面获取的 PowerShell 脚本转换它。今天,这个脚本不再有效。因此,在转到同一页面(现在看起来完全不同)后,我不得不 reinstall their desktop bridge converter,或者管它叫什么。

所以在下载并安装所有先决条件之后,我尝试按照他们的说明将我的 MSI 安装程序转换为这样:

DesktopAppConverter.exe -Installer "C:\Users\UserName\Desktop\Installer-AppName.msi" -Destination "C:\Users\UserName\Desktop\Converter2\OUTConverted" -PackageName "AppPkgName.AppName" -Publisher "CN=John A. Doe, O=John A. Doe, STREET=""123 1st Ave. #1"", L=City, S=ST, PostalCode=12345, C=US" -Version 1.2.3.0 -MakeAppx -Verbose

这给了我这个错误:

A positional parameter cannot be found that accepts argument '7th'.

它到底不喜欢什么?

-Publisher参数中的引号吗?好吧,如果是这样,我必须使用它们来签署生成的 .appx 文件,以便我可以在将其上传到商店之前对其进行测试。 (即,为了能够使用 signtool.exe 签名,发布者名称必须与证书上的名称完全匹配。)

好的,我想我明白了。无论其他人遇到它,如果证书发布者包含空格,则必须用引号引起来。于是变成了这样:

-Publisher """CN=John A. Doe, O=John A. Doe, STREET=""""123 1st Ave. #1"""", L=City, S=ST, PostalCode=12345, C=US"""