SOLVED

MakeAppX and uap3:Verb attribute parameters incorrectly validating

MVP

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.

4 Replies

Hi @TIMOTHY MANGAN,

 

I have reported the issue to the appropriate teams.

 

Thanks for your feedback!
James

best response confirmed by TIMOTHY MANGAN (MVP)
Solution

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: &quot;%1&quot;"

 

Thanks
-Josue

@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. 

@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.

1 best response

Accepted Solutions
best response confirmed by TIMOTHY MANGAN (MVP)
Solution

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: &quot;%1&quot;"

 

Thanks
-Josue

View solution in original post