Forum Discussion
Dec 22, 2020
MakeAppX and uap3:Verb attribute parameters incorrectly validating
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.
Hi 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
- luiscalv
Microsoft
Hi 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
-Josueluiscalv 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.
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.
- James Pike
Microsoft
Hi TIMOTHY_MANGAN,
I have reported the issue to the appropriate teams.
Thanks for your feedback!
James