Dec 22 2020 06:32 AM
There appears to be some issues with how makeappx is parsing the parameters attribute. The underlying type is t:ST_Parameters which expects matching to the regex string
((?!\%[Ii].*\%[Ii]).)*
The following value fails in MakeAppx
<uap3:Verb Id="open" Parameters=" /patchfile:"%1"">open</uap3:Verb>
but removing the space at the beginning of the value for the Parameters attribute solves this. I have also found it necessary to remove other spaces in Parameters, such that
Parameters="/patchfile: "%1""
also fails validation under MakeAppx. All of these strings appear to be valid matches to the defined pattern.
As a workaround I am removing the spaces for this app as it works without them, but there will be apps for which space removal is not an option.
Dec 22 2020 11:41 AM
Hi @TIMOTHY MANGAN,
I have reported the issue to the appropriate teams.
Thanks for your feedback!
James
Dec 22 2020 03:25 PM
SolutionHi @TIMOTHY MANGAN ,
ST_Parameters is based on ST_NonEmptyString. ST_NonEmptyString doesn't allow empty string at the beginning of the string.
AppxManifest parameter doesn't need leading space because the system injects the space between the executable and the arguments.
If you want to use quotes, you have the following options:
Parameters='/patchfile: "%1"'
Parameters="/patchfile: "%1""
Thanks
-Josue
Dec 23 2020 12:25 PM
@luiscalv Thanks. I guess I missed that part of the validation.
It is a pita that the schemas are so stringent on syntaxes that have been acceptable in the past (Win32/.Net Framework). This slows down the progress for moving to the new. I don't have any expectations that will change, just registering frustrations.
Dec 28 2020 11:00 AM
@luiscalv By the way, the Microsoft MSIX packaging tool does produce valid MSIX packages with the syntax shown previously, but also the following syntax: <uap3:Protocol Name="powertoys" Parameters=""%1"">
So I'm not sure if we need to escape the inner quotation marks of if that is a packaging tool bug not caught in the validation.
Dec 22 2020 03:25 PM
SolutionHi @TIMOTHY MANGAN ,
ST_Parameters is based on ST_NonEmptyString. ST_NonEmptyString doesn't allow empty string at the beginning of the string.
AppxManifest parameter doesn't need leading space because the system injects the space between the executable and the arguments.
If you want to use quotes, you have the following options:
Parameters='/patchfile: "%1"'
Parameters="/patchfile: "%1""
Thanks
-Josue