Mysterious error running makepri for Windows Universal App's Desktop Bridge

7

I've been trying to wrap WPF app inside a Windows Universal App, using Desktop Bridge.

In order to make the app's taskbar icon unplated, with transparent background, I followed the instructions that can be found in various blogs and MSDN articles/forums, such as this one.

The first commands I've been executing are these two:

"C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\makepri.exe" createconfig /o /cf priconfig.xml /dq en-US
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\makepri.exe" new /o /pr . /cf priconfig.xml

These commands were executed in the WPF app's output folder, where I also put an AppxManifest.xml file, along with the files and folders referenced by it (such as the Executable file and the Assets' images in various scales and resolutions).

From this point, I got two different weird errors:

First, If the AppManifest.xml file contains the following section:

<Extensions>
<desktop2:Extension Category="windows.firewallRules">
<desktop2:FirewallRules Executable="app\MyWpfApp.exe">
<desktop2:Rule Direction="in" IPProtocol="TCP" Profile="all" />
<desktop2:Rule Direction="in" IPProtocol="UDP" Profile="all" />
</desktop2:FirewallRules>
</desktop2:Extension>
</Extensions>

then the second makepri command will result in the following error message:

onecoreuap\base\mrt\tools\indexertool\src\tool\parametermanager.cpp(:908): error PRI175: 0x80080204 -

onecoreuap\base\mrt\tools\indexertool\src\tool\parametermanager.cpp(:318): error PRI175: 0x80080204 -

Microsoft (R) MakePRI Tool

Copyright (C) 2013 Microsoft. All rights reserved.

error PRI191: 0x80080204 - Appx manifest not found or is invalid. Please ensure well-formed manifest file is present. Or specify an index name with /in switch.

Then if I remove that FirewallRules section, everything seems to run fine - at least on my machine.

Second, It doesn't always run as expected:

when I try to run exactly the same files (with the fixed version of AppxManifest.xml) and same commands on a different machine, I get the same error that I used to get in the first machine (from before removing the FirewallRules section).

Any idea what could be causing these problems? What possible differences between the build machines could cause the second problem? What should I look for?

c#
wpf
win-universal-app
desktop-bridge
makeappx
asked on Stack Overflow Jun 22, 2017 by Yoav Feuerstein • edited Jun 22, 2017 by Yoav Feuerstein

1 Answer

3

The first problem was solved by removing the IgnorableNamespaces property from the Package xml-element (at the root level of AppxManifest.xml).

--

As for the second problem, after contacting Microsoft's support team about this issue, this seems to be a bug in the makepri tool running on older systems:

Apparently, when running on Windows Server 2012 R2 (and perhaps other version as well), the makepri tool command has to supplied with another "optional" parameter that states the app's name:

"C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\makepri" new /o /pr . /cf priconfig.xml /mn AppxManifest.xml /of resources.pri /in "MyAppName"

The important part is the /in "MyAppName" argument at the end of the line, though the other arguments might be crucial as well. Also, "MyAppName" has to be the same as defined in the AppxManifest.xml file, in that part:

<Applications>
  <Application Id="MyAppName" ...>
...

Another step that might have been relevant to solve this issue, was to make sure that the file-mappings file, used later for the makeappx command, has the correct definition for ResourceId - as explained in this article.

answered on Stack Overflow Jul 30, 2017 by Yoav Feuerstein • edited Jul 30, 2017 by Yoav Feuerstein

User contributions licensed under CC BY-SA 3.0